Skip to content

Rollup of 14 pull requests #78311

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

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
16e10bf
Revert "Allow dynamic linking for iOS/tvOS targets."
francesca64 Oct 7, 2020
b62b352
Check for exhaustion in RangeInclusive::contains
cuviper Oct 19, 2020
9fd79a3
make exhausted RangeInclusive::end_bound return Excluded(end)
cuviper Oct 19, 2020
a9470d0
Simplify assert terminator only if condition evaluates to expected value
tmiasko Oct 21, 2020
9202fbd
Check for exhaustion in SliceIndex for RangeInclusive
cuviper Oct 21, 2020
40ab18d
improve const infer error
lcnr Oct 22, 2020
9775ac6
Document inline-const in the Unstable Book
camelid Oct 22, 2020
09135e4
Add regression test for issue-77475
JohnTitor Oct 23, 2020
e1c524c
review
lcnr Oct 23, 2020
50e34d6
Do not try to report on closures to avoid ICE
JohnTitor Oct 23, 2020
9b90e17
add `insert` and `insert_with` to `Option`
Canop Oct 1, 2020
e8df2a4
remove `option.insert_with`
Canop Oct 1, 2020
60a96ca
more tests in option.insert, code cleaning in option
Canop Oct 1, 2020
cc8b77a
fix naming unconsistency between function doc and prototype
Canop Oct 3, 2020
3955779
Update library/core/src/option.rs
Canop Oct 23, 2020
415a8e5
Update library/core/src/option.rs
Canop Oct 23, 2020
216d0fe
add tracking issue number to option_insert feature gate
Canop Oct 23, 2020
efedcb2
Update description of Empty Enum for accuracy
Enet4 Oct 23, 2020
972d9e8
move `visit_predicate` into `TypeVisitor`
lcnr Oct 23, 2020
a0ce1e0
Always store Rustdoc theme when it's changed
nasso Oct 23, 2020
c3cbaf6
x.py test --test-args flag description enhancement
njasm Oct 22, 2020
929f80e
Add a spin loop hint for Arc::downgrade
nicbn Sep 12, 2020
f3265fe
Fix Ubuntu download URL
jonas-schievink Oct 23, 2020
589537f
Rollup merge of #76649 - nicbn:arc-spin-loop-hint, r=m-ou-se
jonas-schievink Oct 23, 2020
2918e14
Rollup merge of #77392 - Canop:option_insert, r=m-ou-se
jonas-schievink Oct 23, 2020
b168abe
Rollup merge of #77716 - francesca64:revert-ios-dynamic-linking, r=jo…
jonas-schievink Oct 23, 2020
d2a6f8e
Rollup merge of #78109 - cuviper:exhausted-rangeinc, r=dtolnay
jonas-schievink Oct 23, 2020
47ff2ff
Rollup merge of #78198 - tmiasko:assert, r=davidtwco
jonas-schievink Oct 23, 2020
d3f33be
Rollup merge of #78243 - njasm:patch_test_args_description, r=jyn514
jonas-schievink Oct 23, 2020
02af194
Rollup merge of #78249 - lcnr:ct-infer-origin, r=varkor
jonas-schievink Oct 23, 2020
db148ad
Rollup merge of #78250 - camelid:document-inline-const, r=spastorino
jonas-schievink Oct 23, 2020
f94099a
Rollup merge of #78264 - JohnTitor:macro-test, r=petrochenkov
jonas-schievink Oct 23, 2020
90aa72b
Rollup merge of #78268 - JohnTitor:issue-78262, r=estebank
jonas-schievink Oct 23, 2020
0fee325
Rollup merge of #78274 - Enet4:patch-1, r=jonas-schievink
jonas-schievink Oct 23, 2020
f7a56d7
Rollup merge of #78278 - lcnr:predicate-visit, r=matthewjasper
jonas-schievink Oct 23, 2020
d48f449
Rollup merge of #78293 - nasso:master, r=GuillaumeGomez
jonas-schievink Oct 23, 2020
5f61b55
Rollup merge of #78309 - jonas-schievink:fix-ci, r=pietroalbini
jonas-schievink Oct 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Do not try to report on closures to avoid ICE
  • Loading branch information
JohnTitor committed Oct 23, 2020
commit 50e34d6d658c4906a3292385b1962a3c26ce24c4
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
) if **sub_r == RegionKind::ReStatic => {
// This is for an implicit `'static` requirement coming from `impl dyn Trait {}`.
if let ObligationCauseCode::UnifyReceiver(ctxt) = &cause.code {
// This may have a closure and it would cause ICE
// through `find_param_with_region` (#78262).
let anon_reg_sup = tcx.is_suitable_region(sup_r)?;
let fn_returns = tcx.return_type_impl_or_dyn_traits(anon_reg_sup.def_id);
if fn_returns.is_empty() {
return None;
}

let param = self.find_param_with_region(sup_r, sub_r)?;
let lifetime = if sup_r.has_name() {
format!("lifetime `{}`", sup_r)
Expand Down
9 changes: 9 additions & 0 deletions src/test/ui/regions/issue-78262.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
trait TT {}

impl dyn TT {
fn func(&self) {}
}

fn main() {
let f = |x: &dyn TT| x.func(); //~ ERROR: mismatched types
}
18 changes: 18 additions & 0 deletions src/test/ui/regions/issue-78262.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
error[E0308]: mismatched types
--> $DIR/issue-78262.rs:8:28
|
LL | let f = |x: &dyn TT| x.func();
| ^^^^ lifetime mismatch
|
= note: expected reference `&(dyn TT + 'static)`
found reference `&dyn TT`
note: the anonymous lifetime #1 defined on the body at 8:13...
--> $DIR/issue-78262.rs:8:13
|
LL | let f = |x: &dyn TT| x.func();
| ^^^^^^^^^^^^^^^^^^^^^
= note: ...does not necessarily outlive the static lifetime

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.