-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Make outlives::{components,verify} agree #97406
Conversation
a935b8e
to
574dd0e
Compare
r? @oli-obk |
Nominating for T-types discussion: fn opaque<F>(_: F) -> impl Iterator { b"".iter() }
fn assert_static<T: 'static>(_: T) {}
fn good_generic_fn<T>() {
// proving `<OpaqueTy<type_of(async {})> as Iterator>::Item: 'static`
// somehow requires `T: 'static`.
assert_static(opaque(async {}).next());
assert_static(opaque(|| {}).next());
assert_static(opaque(opaque(async {}).next()).next());
} does not compile right now, because the This scheme already works on stable for simpler cases, but in associated types it breaks down. Thus I nominate for T-types instead of T-lang, since imo this is just-an-impl-bug and the behaviour intended by the lang team. |
a less contrived example that should be pass now: fn from_fn<F>(_: F) -> impl IntoIterator<Item = u8> { [] }
fn generic_fn<T>() -> Box<dyn Iterator<Item = u8>> {
Box::new(from_fn(|| {}).into_iter())
//~^ ERROR the associated type `<impl IntoIterator<Item = u8> as IntoIterator>::IntoIter` may not live long enough
} |
574dd0e
to
de2750f
Compare
Let's see if this opens a zulip thread automagically |
oli-obk is in vacation, so @nikomatsakis choosed you because you recently touched |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit de2750fde4f48b772a0f60ebfa69192ece57c805 with merge adb581d2e9a6bc04d25a117528c5bb41de56d059... |
☀️ Try build successful - checks-actions |
Queued adb581d2e9a6bc04d25a117528c5bb41de56d059 with parent ebe184a, future comparison URL. |
Finished benchmarking commit (adb581d2e9a6bc04d25a117528c5bb41de56d059): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Footnotes |
fb6a645
to
4215a9f
Compare
fcfe34d
to
570cf75
Compare
I have rebased to adjust for NLL diagnostic regressions. The first commit has not changed. r? @oli-obk |
@bors r+ |
⌛ Testing commit 570cf75 with merge f097ed2c9de38bd491399e96de8e1f1d1321d2f9... |
💔 Test failed - checks-actions |
The job Click to see the possible cause of the failure (guessed by this bot)
|
Spurious? @bors retry |
☀️ Test successful - checks-actions |
Finished benchmarking commit (b90a0ed): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
fixes #97405
cc @oli-obk this is should fix #95474 (comment)
r? @oli-obk