Fix ICE when an associated type is wrongly marked as final#152926
Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom Feb 22, 2026
Merged
Fix ICE when an associated type is wrongly marked as final#152926rust-bors[bot] merged 1 commit intorust-lang:mainfrom
final#152926rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
fmease
reviewed
Feb 20, 2026
mu001999
reviewed
Feb 20, 2026
80b7c7e to
812e16e
Compare
Member
Author
|
@rustbot ready |
fmease
reviewed
Feb 21, 2026
Member
There was a problem hiding this comment.
Could you also add a (type-leve) assoc const case? They also ICEs on nightly (with no default value for trait assoc const in compiler/rustc_hir_analysis/src/collect.rs) & should be fixed by this PR. Maybe tests/ui/traits/final/final-on-assoc-type-const.rs (sic!) containing:
// See also <https://github.com/rust-lang/rust/issues/152797>..
#![feature(final_associated_functions, min_generic_const_items)]
#![expect(incomplete_features)]
trait Uwu {
final type const OVO: ();
//~^ error: `final` is only allowed on associated functions in traits
}
fn main() {}Much appreciated!
Member
Author
There was a problem hiding this comment.
Oops I just combined the two tests :(( I've already force pushed 3 times so if that doesn't matter too much I'd prefer to leave it as is...
Member
|
Some small nits then I'll approve & put it into the queue. Thanks for working on this! |
e0e54d9 to
89715df
Compare
Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
89715df to
bde075b
Compare
fmease
approved these changes
Feb 22, 2026
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Feb 22, 2026
…ease Fix ICE when an associated type is wrongly marked as `final` Fixes: rust-lang#152797. cc @mu001999 .
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Feb 22, 2026
…ease Fix ICE when an associated type is wrongly marked as `final` Fixes: rust-lang#152797. cc @mu001999 .
rust-bors bot
pushed a commit
that referenced
this pull request
Feb 22, 2026
…uwer Rollup of 8 pull requests Successful merges: - #149366 (GVN: consider constants of primitive types as deterministic) - #152779 (Clarify aspects of query macros) - #152958 (`rustc_queries` simplifications) - #152385 (Feature gate for defaulted associated type_consts with associated_type_defaults ) - #152708 (Build: Add `stdenv.cc.cc.lib` to Nix dependencies) - #152921 (Add build.rustdoc option to bootstrap config) - #152926 (Fix ICE when an associated type is wrongly marked as `final`) - #152927 (Index expressions rendered the index: subexpression as the id, instea…)
rust-bors bot
pushed a commit
that referenced
this pull request
Feb 22, 2026
…uwer Rollup of 7 pull requests Successful merges: - #152779 (Clarify aspects of query macros) - #152958 (`rustc_queries` simplifications) - #152385 (Feature gate for defaulted associated type_consts with associated_type_defaults ) - #152708 (Build: Add `stdenv.cc.cc.lib` to Nix dependencies) - #152921 (Add build.rustdoc option to bootstrap config) - #152926 (Fix ICE when an associated type is wrongly marked as `final`) - #152927 (Index expressions rendered the index: subexpression as the id, instea…)
rust-timer
added a commit
that referenced
this pull request
Feb 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #152797.
cc @mu001999 .