Reject impl const Trait since the right syntax is const impl Trait now#158009
Conversation
|
Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter cc @rust-lang/miri, @RalfJung, @lcnr The parser was modified, potentially altering the grammar of (stable) Rust cc @fmease
cc @rust-lang/rustfmt
cc @Amanieu, @folkertdev, @sayantn |
|
|
This comment has been minimized.
This comment has been minimized.
4ee676c to
b677ee5
Compare
This comment has been minimized.
This comment has been minimized.
b677ee5 to
a88521a
Compare
Only when we successfully parse it though, no? |
Well yes, it doesn't do so anymore after this change. But what I meant was that this has been the behaviour for a few months now, so everyone should be migrated. |
|
To the 7.6k files on GitHub and many more elsewhere, sorry :3 |
| //@ !has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/span[@class="where"]' '[const]' | ||
| //@ has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/div[@class="where"]' ': Fn' | ||
| impl<T: /* [const] */ Fn() /* + [const] Destruct */> const Tr<T> for T | ||
| const impl<T: /* [const] */ Fn() /* + [const] Destruct */> Tr<T> for T |
There was a problem hiding this comment.
this test isn't even testing anything for now... we should fix that soon
|
@bors r+ rollup |
Rollup of 12 pull requests Successful merges: - #156795 (Handle generic reborrow in expression-use adjustment walking) - #157694 (Enhance documentation on wake call memory ordering) - #157935 (Make `proc_macro::ConversionErrorKind` non exhaustive) - #158002 (Replace `unwrap` with `expect` in `get_module_children`) - #158009 (Reject `impl const Trait` since the right syntax is `const impl Trait` now) - #158034 (Fix reborrow source expression visits) - #158072 (Bump thin-vec to 0.2.18 to address RUSTSEC-2026-0103) - #158074 (Document transient connection errors from TcpListener::accept) - #158077 (rustdoc-json-types: Replace bincode dev-dependency with postcard) - #158086 (renovate: Loosen dashboard approval and adopt recommended config) - #158088 (codegen_ssa: no dbginfo for scalable vec local w/ `-O0`) - #158089 (Fix invalid "jump-to-def" doc link generation when an item has a `derive` proc-macro)
Rollup of 12 pull requests Successful merges: - rust-lang/rust#156795 (Handle generic reborrow in expression-use adjustment walking) - rust-lang/rust#157694 (Enhance documentation on wake call memory ordering) - rust-lang/rust#157935 (Make `proc_macro::ConversionErrorKind` non exhaustive) - rust-lang/rust#158002 (Replace `unwrap` with `expect` in `get_module_children`) - rust-lang/rust#158009 (Reject `impl const Trait` since the right syntax is `const impl Trait` now) - rust-lang/rust#158034 (Fix reborrow source expression visits) - rust-lang/rust#158072 (Bump thin-vec to 0.2.18 to address RUSTSEC-2026-0103) - rust-lang/rust#158074 (Document transient connection errors from TcpListener::accept) - rust-lang/rust#158077 (rustdoc-json-types: Replace bincode dev-dependency with postcard) - rust-lang/rust#158086 (renovate: Loosen dashboard approval and adopt recommended config) - rust-lang/rust#158088 (codegen_ssa: no dbginfo for scalable vec local w/ `-O0`) - rust-lang/rust#158089 (Fix invalid "jump-to-def" doc link generation when an item has a `derive` proc-macro)
rust-lang/rust#158009 removed the old syntax, starting with nightly-2025-06-19. This only updates the tests and docs, as the macro itself works fine.
I also let some smaller rustfmting of ui tests through, as rustfmt immediately formats
impl const Traittoconst impl Trait. This is also the reason I expect that this change will break very little nightly users, so we don't even need to add some helpful diagnostic.r? @fee1-dead