Skip to content
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

Merged
merged 2 commits into from
Nov 30, 2021

Conversation

jackh726
Copy link
Member

Partial revert of #88312

r? @pnkfelix
cc @nikomatsakis

Comment on lines -8 to -28
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>) {}
}
Copy link
Contributor

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?

Copy link
Member Author

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.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Nov 29, 2021

📌 Commit eeaa215 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 29, 2021
@Mark-Simulacrum Mark-Simulacrum added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Nov 29, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 29, 2021
Don't treat unnormalized function arguments as well-formed

Partial revert of rust-lang#88312

r? `@pnkfelix`
cc `@nikomatsakis`
@jackh726
Copy link
Member Author

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Nov 29, 2021

📌 Commit 692e96c has been approved by nikomatsakis

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 29, 2021
…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`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 30, 2021
Don't treat unnormalized function arguments as well-formed

Partial revert of rust-lang#88312

r? `@pnkfelix`
cc `@nikomatsakis`
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 30, 2021
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
@bors bors merged commit 6e7cf2e into rust-lang:master Nov 30, 2021
@rustbot rustbot added this to the 1.59.0 milestone Nov 30, 2021
@jackh726 jackh726 deleted the issue-91068 branch November 30, 2021 15:31
@Mark-Simulacrum Mark-Simulacrum modified the milestones: 1.59.0, 1.57.0 Dec 2, 2021
@jackh726 jackh726 restored the issue-91068 branch March 12, 2022 18:30
@jackh726 jackh726 deleted the issue-91068 branch March 12, 2022 18:34
@jackh726 jackh726 restored the issue-91068 branch March 12, 2022 18:42
@jackh726 jackh726 deleted the issue-91068 branch March 12, 2022 18:45
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 31, 2022
small rustc_borrowck cleanup

r? `@jackh726` because of the second commit, seems like that comment was missed in rust-lang#91243
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants