Currently a test without a `failure-status` directive is treated as having an
expected failure-status of 1, but `run-coverage` tests will want to treat those
tests as expecting success instead.
This will allow the `run-coverage` mode to easily set environment variable
`LLVM_PROFILE_FILE`, and to prevent the executable from being deleted after a
successful run.
Add tests impl via obj unless denied
Fixes#112737
Add simple tests to check feature change in #112320 is performing as expected.
Note:
- Unsure about filenames, locations & function signature names (tried to make them something sensible)
Make `UnwindAction::Continue` explicit in MIR dump
Makes it easier to spot unwinding related issues in MIR by making `UnwindAction::Continue` explicit, just like all other `UnwindAction`s.
Allow comparing `Box`es with different allocators
Currently, comparing `Box`es over different allocators is not allowed:
```Rust
error[E0308]: mismatched types
--> library/alloc/tests/boxed.rs:22:20
|
22 | assert_eq!(b1, b2);
| ^^ expected `Box<{integer}, ConstAllocator>`, found `Box<{integer}, AnotherAllocator>`
|
= note: expected struct `Box<{integer}, ConstAllocator>`
found struct `Box<{integer}, AnotherAllocator>`
For more information about this error, try `rustc --explain E0308`.
error: could not compile `alloc` (test "collectionstests") due to previous error
```
This PR lifts this limitation
Make compiletest aware of targets without dynamic linking
Some parts of the compiletest internals and some tests require dynamic linking to work, which is not supported by all targets. Before this PR, this was handled by if branches matching on the target name.
This PR loads whether a target supports dynamic linking or not from the target spec, and adds a `// needs-dynamic-linking` attribute for tests that require it. Note that I was not able to replace all the old conditions based on the target name, as some targets have `dynamic_linking: true` in their spec but pretend they don't have it in compiletest.
Also, to get this to work I had to *partially* revert #111472 (cc `@djkoloski` `@tmandry` `@bjorn3).` On one hand, only the target spec contains whether a target supports dynamic linking, but on the other hand a subset of the fields can be overridden through `-C` flags (as far as I'm aware only `-C panic=$strategy`). The solution I came up with is to take the target spec as the base, and then override the panic strategy based on `--print=cfg`. Hopefully that should not break y'all again.
Add trustzone and virtualization target features for aarch32.
These are LLVM target features which allow the `smc` and `hvc` instructions respectively to be used in inline assembly.
`thir`: Add `Become` expression kind
This PR is pretty small and just adds `thir::ExprKind::Become`. I didn't include the checks that will be done on thir, since they are much more complicated and can be done in parallel with with MIR (or, well, at least I believe they can).
r? `@Nilstrieb`
Export AnalysisResults trait in rustc_mir_dataflow
Followup to https://github.com/rust-lang/rust/pull/108293
Re-exports the new trait defined in mentioned PR to make ResultsCursor::seek_before_primary_effect, ResultsCursor::seek_after_primary_effect... usable again outside the compiler itself.
Use `CoverageKind::as_operand_id` instead of manually reimplementing it
These two pieces of code are functionally equivalent to the `CoverageKind::as_operand_id` method that already exists, and is already used elsewhere in this file.
This slightly reduces the amount of code that manually pattern-matches on `CoverageKind`.
bootstrap: rename 'user' profile to 'dist'
Fixes#112074
Unfortunately a big chunk of the diff is adding `PartialEq/Eq/Debug` impls so we can `assert_eq` but I think better to have them in the long run.
For back compat, ensure `"maintainer"`, `"user"` and `"dist"` are all parsed as `Profile::Dist`.
r? `@jyn514`
cc `@AnakinSkywalkeer` who worked on the previous attempt at this
Update books
## nomicon
2 commits in b5f018fb5930cb733b0a8aaf2eed975d4771e74d..c369e4b489332f8721fbae630354fa83385d457d
2023-05-19 11:10:25 -0700 to 2023-06-04 23:21:07 +0900
- phantom-data: Add `Send` and `Sync` columns (rust-lang/nomicon#411)
- Rewrite the chapter on subtyping and variance (rust-lang/nomicon#340)
## reference
5 commits in 553d99b02a53b4133a40d5bd2e19958c67487c00..5ca365eac678cb0d41a20b3204546d6ed70c7171
2023-05-22 10:50:07 -0700 to 2023-06-22 10:13:08 -0700
- Document the ordering behavior of crate cfgs (rust-lang/reference#1369)
- fix incorrect syntax for type-paths (rust-lang/reference#1370)
- Fix inconsistent formatting of Disambiguating Function Calls example (rust-lang/reference#1366)
- Add LoongArch to inline-assembly documentation (rust-lang/reference#1357)
- comments: Fix typo: inner -> outer (rust-lang/reference#1364)
## book
1 commits in 8fa6b854d515506d825390fe0d817f5ef0c89350..21cf840842bdf768a798869f06373c96c1cc5122
2023-04-12 20:05:30 -0400 to 2023-06-12 12:24:06 -0400
- Correct `i32` formatting in ch19-05
## rust-by-example
10 commits in 8ee9528b72b927cff8fd32346db8bbd1198816f0..57636d6926762861f34e030d52ca25a71e95e5bf
2023-05-01 18:18:34 -0300 to 2023-06-20 21:49:11 -0300
- Fixed line number (rust-lang/rust-by-example#1723)
- Fix example in from_into.md (rust-lang/rust-by-example#1720)
- cast.md improvements for signed boundary case casting (rust-lang/rust-by-example#1719)
- Correct commentary about arrays in iter_find.md (rust-lang/rust-by-example#1714)
- Improved wording in asm.md (rust-lang/rust-by-example#1717)
- fix link to inline assembly reference (rust-lang/rust-by-example#1715)
- Fix grammar in string.md (rust-lang/rust-by-example#1713)
- Update let-else example with main function (rust-lang/rust-by-example#1711)
- Expand `Option::and_then` example to contrast with `map` (rust-lang/rust-by-example#1710)
- Add example for destructuring structs without match (rust-lang/rust-by-example#1709)
## rustc-dev-guide
9 commits in f1e637883fafeb83bdd5906ee7f467e4d35b7337..17fe3e948498c50e208047a750f17d6a8d89669b
2023-05-17 21:44:05 -0500 to 2023-06-26 18:34:26 +0200
- fix_typo
- run-make tests: fix and improve (rust-lang/rustc-dev-guide#1702)
- add stub for proof trees (rust-lang/rustc-dev-guide#1700)
- Update track_caller reference link (rust-lang/rustc-dev-guide#1688)
- Include information about setup defaults in how-to-build guide (rust-lang/rustc-dev-guide#1694)
- Fix typo (rust-lang/rustc-dev-guide#1697)
- Fix typo in thir.md
- Update triagebot links.
- name-resolution: Fix some typos in "Scopes and ribs"
Migrate `TyCtxt::predicates_of` and `ParamEnv::caller_bounds` to `Clause`
The last big change in the series.
I will follow-up with additional filed issues once this PR lands:
- [ ] Investigate making `TypeFoldable<TyCtxt<'tcx>> for ty::Clause<'tcx>` implementation less weird: 2efe091705/compiler/rustc_middle/src/ty/structural_impls.rs (L672)
- [ ] Clean up the elaborator since it should only be emitting child clauses, not predicates
- [ ] Rename identifiers like `pred` and `predicates` to `clause` if they're actually clauses around the codebase
- [ ] Validate that all of the `ToPredicate` impls are acutally still needed, or prune them if they're not
r? `@ghost` until the other branch lands
rustdoc: render generic params & where-clauses of cross-crate assoc tys in impls
We used to only ever render generic parameters & where-clauses of cross-crate associated types when the item was located inside of a trait and we used to just drop them when it was inside of an impl block (trait or inherent).
Fixes#112904.
`@rustbot` label A-cross-crate-reexports