Only include lint in future_incompatible lint group if not an edition lint
A follow up to #86330 - this only includes lints annotated with `FutureIncompatibleInfo` in the `future_incompatibile` lint group if the future compatibility is not tied to an edition.
We probably want to rename `FutureIncompatibleInfo` to something else since this type is now used to indicate future breakages of all kinds (even those that happen in editions). I'd prefer to do that in a separate PR though.
r? `@nikomatsakis`
Move some UI tests to more suitable subdirs
cc #73494
The classified result is here: https://gist.github.com/JohnTitor/c9e00840990b5e4a8fc562ec3571e427
- issues/issue-27060.rs: misclassified, should be packed.
- issues/issue-45157.rs: moved to nll.
- issues/issue-69532.rs: ~~couldn't figured out the best place, placed a new `llvm` dir~~ moved to consts.
- fsu-moves-and-copies.rs: moved to borrowck.
- issues/issue-36638.rs: misclassified, moved to keyword.
- issues/issue-48636.rs: moved to parser.
- issues/issue-37655.rs: I'm not sure but associated-types shouldn't the best, moved to coercion but region may be better.
- issues/issue-20005.rs: moved to associated-types.
- issues/issue-82869.rs: moved to asm.
- issues/issue-24535-allow-mutable-borrow-in-match-guard.rs: moved to nll.
- issues/issue-52169.rs: moved to macros.
- test-passed.rs: moved to test-attrs along with `test-` prefixed tests.
- test-cfg.rs: moved to conditional-compilation.
- non-integer-atomic.rs: moved to intrinsics.
- issues/issue-54521-2.rs: moved to parser.
- issues/issue-17756.rs: moved to consts.
- conversion-methods.rs: ~~moved to suggestions~~ moved to typeck.
r? `@petrochenkov`
Change vtable memory representation to use tcx allocated allocations.
This fixes https://github.com/rust-lang/rust/issues/86324. However i suspect there's more to change before it can land.
r? `@bjorn3`
cc `@rust-lang/miri`
Don't make `rustc_insignificant_dtor` feature gate
This isn't a feature gate, it's an attribute that is feature gated behind the `rustc_attrs` attribute. Closes#85680.
Fix garbled suggestion for missing lifetime specifier
This PR fixes#86667. The suggestion code currently checks whether there is a generic parameter that is not a synthetic `impl Trait` parameter and, if so, suggests to insert a new lifetime `'a` before that generic parameter. However, it does not make sense to insert `'a` in front of an elided lifetime parameter, since these are synthetic as well, which leads to the garbled suggestion in #86667.
Turn non_fmt_panic into a future_incompatible edition lint.
This turns the `non_fmt_panic` lint into a future_incompatible edition lint, so it becomes part of the `rust_2021_compatibility` group. See https://github.com/rust-lang/rust/issues/85894.
This lint produces both warnings about semantical changes (e.g. `panic!("{{")`) and things that will become hard errors (e.g. `panic!("{")`). So I added a `explain_reason: false` that supresses the default "this will become a hard error" or "the semantics will change" message, and instead added a note depending on the situation. (cc `@rylev)`
r? `@nikomatsakis`
Fix `future_prelude_collision` false positive
Fixes#86633
The lint for checking if method resolution of methods named `try_into` will fail in 2021 edition previously would fire on all inherent methods, however for inherent methods that consume `self`, this takes priority over `TryInto::try_into` due to being inherent, while trait method and methods that take `&self` or `&mut self` don't take priority, and thus aren't affected by this false positive.
This fix is rather simple: simply checking if the inherent method doesn't auto-deref or auto-ref (and thus takes `self`) and if so, prevents the lint from firing.
Add support for OpenSSL 3.0.0
This updates the `openssl` and `openssl-sys` crates to support building
the toolchain with system libraries up to OpenSSL 3.0.0. This does not
affect the static version used via `openssl-src` in CI builds.
ref: https://github.com/sfackler/rust-openssl/pull/1264
Don't run a publically reachable server in tests
This causes Windows Defender's firewall to pop up during tests to ask if I want to allow the test program to access the public Internet, since it was listening on `0.0.0.0` (the test passes regardless of how you respond to the modal, since the firewall only affects traffic outside of the computer, none of which actually happens in the test). The test server doesn't actually need to be publicly reachable, so this makes it so it is only reachable locally, which makes Windows Defender happy.
This prevents mistakes where the feature is in the list of incomplete
features but not actually a feature by making the incompleteness a part
of the declaration.
Rollup of 6 pull requests
Successful merges:
- #86206 (Fix type checking of return expressions outside of function bodies)
- #86358 (fix pretty print for `loop`)
- #86568 (Don't dist miri or rust-analyzer on stable or beta.)
- #86683 (⬆️ rust-analyzer)
- #86687 (Allow anyone to set `perf-regression` label)
- #86688 (Add a regression test for issue-65384)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Don't dist miri or rust-analyzer on stable or beta.
This prevents miri and rust-analyzer from being built for "dist" or "install" on the stable/beta channels. It is a nightly-only tool and should not be included.
Closes#86286
Fix type checking of return expressions outside of function bodies
This pull request fixes#86188. The problem is that the current code for type-checking `return` expressions stops if the `return` occurs outside of a function body, while the correct behavior is to continue type-checking the return value expression (otherwise an ICE happens later on because variables declared in the return value expression don't have a type).
Also, I have noticed that it is sometimes not obvious why a `return` is outside of a function body; for instance, in the example from #86188 (which currently causes an ICE):
```rust
fn main() {
[(); return || {
let tx;
}]
}
```
I have changed the error message to also explain why the `return` is considered outside of the function body:
```
error[E0572]: return statement outside of function body
--> ice0.rs:2:10
|
1 | / fn main() {
2 | | [(); return || {
| |__________^
3 | || let tx;
4 | || }]
| ||_____^ the return is part of this body...
5 | | }
| |_- ...not the enclosing function body
```
Fix typo in libs tracking issue template
Currently, the libs tracking issue template expands FCP as "final commenting period". Everywhere else, including in [the official explanation](https://rust-lang.github.io/rfcs/), it's expanded as "final comment period". That version also sounds a bit better. Accordingly, this PR changes the tracking issue template to use that version.
`@rustbot` label A-meta T-libs-api
r? `@m-ou-se`