-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't treat unnormalized function arguments as well-formed #91243
Conversation
trait MyTrait { | ||
type Assoc<'a, 'b> where 'b: 'a; | ||
fn do_sth(arg: Self::Assoc<'_, '_>); | ||
} | ||
|
||
struct A; | ||
struct B; | ||
struct C; | ||
|
||
impl MyTrait for A { | ||
type Assoc<'a, 'b> where 'b: 'a = u32; | ||
fn do_sth(_: u32) {} | ||
} | ||
impl MyTrait for B { | ||
type Assoc<'a, 'b> where 'b: 'a = u32; | ||
fn do_sth(_: Self::Assoc<'_, '_>) {} | ||
} | ||
impl MyTrait for C { | ||
type Assoc<'a, 'b> where 'b: 'a = u32; | ||
fn do_sth(_: Self::Assoc<'static, 'static>) {} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this means that #87748 ought to be opened again? Would there be a way to conciliate that issue with the soundness issue fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it should be. In theory, there are better fixes (that will happen eventually), but a revert is better for now, due to the rather large soundness hole.
@bors r+ |
📌 Commit eeaa215 has been approved by |
Don't treat unnormalized function arguments as well-formed Partial revert of rust-lang#88312 r? `@pnkfelix` cc `@nikomatsakis`
@bors r=nikomatsakis |
📌 Commit 692e96c has been approved by |
…ulacrum [beta] branch master to beta Bumps channel and includes a backport of: * Don't treat unnormalized function arguments as well-formed rust-lang#91243 r? `@Mark-Simulacrum`
Don't treat unnormalized function arguments as well-formed Partial revert of rust-lang#88312 r? `@pnkfelix` cc `@nikomatsakis`
Rollup of 8 pull requests Successful merges: - rust-lang#91243 (Don't treat unnormalized function arguments as well-formed) - rust-lang#91250 (Refactor EmitterWriter::emit_suggestion_default ) - rust-lang#91317 (tests: Ignore `test/debuginfo/rc_arc.rs` on windows-gnu) - rust-lang#91323 (CTFE: support assert_zero_valid and assert_uninit_valid) - rust-lang#91358 (Fix small typo) - rust-lang#91360 (:arrow_up: rust-analyzer) - rust-lang#91368 (Don't re-export `MirPass`) - rust-lang#91383 (Add `drop_while` as doc alias to `Iterator::skip_while`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
small rustc_borrowck cleanup r? `@jackh726` because of the second commit, seems like that comment was missed in rust-lang#91243
Partial revert of #88312
r? @pnkfelix
cc @nikomatsakis