Auto merge of #70568 - Dylan-DPC:rollup-em6vnpx, r=Dylan-DPC

Rollup of 4 pull requests

Successful merges:

 - #70479 (avoid creating unnecessary reference in Windows Env iterator)
 - #70546 (Polonius: update to 0.12.1, fix more move errors false positives, update test expectations)
 - #70559 (fix BTreeMap test compilation with Miri)
 - #70567 (Fix broken link in README)

Failed merges:

r? @ghost
This commit is contained in:
bors 2020-03-30 14:25:34 +00:00
commit 9a12971da5
10 changed files with 23 additions and 17 deletions

View file

@ -2522,9 +2522,9 @@ checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677"
[[package]] [[package]]
name = "polonius-engine" name = "polonius-engine"
version = "0.12.0" version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04d8ef65e3f89ecaec9ca7cb0e0911b4617352d4494018bcf934992f03f2024c" checksum = "ef2558a4b464e185b36ee08a2937ebb62ea5464c38856cfb1465c97cb38db52d"
dependencies = [ dependencies = [
"datafrog", "datafrog",
"log", "log",

View file

@ -528,7 +528,7 @@ fn test_range_1000() {
#[cfg(not(miri))] // Miri is too slow #[cfg(not(miri))] // Miri is too slow
let size = 1000; let size = 1000;
#[cfg(miri)] #[cfg(miri)]
let size = MIN_INSERTS_HEIGHT_2; let size = MIN_INSERTS_HEIGHT_2 as u32;
let map: BTreeMap<_, _> = (0..size).map(|i| (i, i)).collect(); let map: BTreeMap<_, _> = (0..size).map(|i| (i, i)).collect();
fn test(map: &BTreeMap<u32, u32>, size: u32, min: Bound<&u32>, max: Bound<&u32>) { fn test(map: &BTreeMap<u32, u32>, size: u32, min: Bound<&u32>, max: Bound<&u32>) {

View file

@ -4,4 +4,4 @@ that runs towards the end of the compilation process.
For more information about how codegen works, see the [rustc dev guide]. For more information about how codegen works, see the [rustc dev guide].
[rustc dev guide]: https://rustc-dev-guide.rust-lang.org/codegen.html [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/backend/codegen.html

View file

@ -43,7 +43,7 @@ impl UseFactsExtractor<'_> {
fn insert_path_access(&mut self, path: MovePathIndex, location: Location) { fn insert_path_access(&mut self, path: MovePathIndex, location: Location) {
debug!("UseFactsExtractor::insert_path_access({:?}, {:?})", path, location); debug!("UseFactsExtractor::insert_path_access({:?}, {:?})", path, location);
self.path_accessed_at_base.push((path, self.location_table.start_index(location))); self.path_accessed_at_base.push((path, self.location_to_index(location)));
} }
fn place_to_mpi(&self, place: &Place<'_>) -> Option<MovePathIndex> { fn place_to_mpi(&self, place: &Place<'_>) -> Option<MovePathIndex> {

View file

@ -94,7 +94,7 @@ impl Iterator for Env {
if *self.cur == 0 { if *self.cur == 0 {
return None; return None;
} }
let p = &*self.cur as *const u16; let p = self.cur as *const u16;
let mut len = 0; let mut len = 0;
while *p.offset(len) != 0 { while *p.offset(len) != 0 {
len += 1; len += 1;

View file

@ -2,7 +2,7 @@ error[E0521]: borrowed data escapes outside of closure
--> $DIR/expect-region-supply-region.rs:18:9 --> $DIR/expect-region-supply-region.rs:18:9
| |
LL | let mut f: Option<&u32> = None; LL | let mut f: Option<&u32> = None;
| ----- `f` is declared here, outside of the closure body | ----- `f` declared here, outside of the closure body
LL | closure_expecting_bound(|x| { LL | closure_expecting_bound(|x| {
| - `x` is a reference that is only valid in the closure body | - `x` is a reference that is only valid in the closure body
LL | f = Some(x); LL | f = Some(x);
@ -12,7 +12,7 @@ error[E0521]: borrowed data escapes outside of closure
--> $DIR/expect-region-supply-region.rs:28:9 --> $DIR/expect-region-supply-region.rs:28:9
| |
LL | let mut f: Option<&u32> = None; LL | let mut f: Option<&u32> = None;
| ----- `f` is declared here, outside of the closure body | ----- `f` declared here, outside of the closure body
LL | closure_expecting_bound(|x: &u32| { LL | closure_expecting_bound(|x: &u32| {
| - `x` is a reference that is only valid in the closure body | - `x` is a reference that is only valid in the closure body
LL | f = Some(x); LL | f = Some(x);
@ -33,7 +33,7 @@ error[E0521]: borrowed data escapes outside of closure
--> $DIR/expect-region-supply-region.rs:42:9 --> $DIR/expect-region-supply-region.rs:42:9
| |
LL | let mut f: Option<&u32> = None; LL | let mut f: Option<&u32> = None;
| ----- `f` is declared here, outside of the closure body | ----- `f` declared here, outside of the closure body
... ...
LL | closure_expecting_bound(|x: &'x u32| { LL | closure_expecting_bound(|x: &'x u32| {
| - `x` is a reference that is only valid in the closure body | - `x` is a reference that is only valid in the closure body

View file

@ -39,6 +39,7 @@ LL | | // Not OK -- The forwarding impl for `Foo` requires that `Bar` also
... | ... |
LL | | foo_hrtb_bar_not(&mut t); LL | | foo_hrtb_bar_not(&mut t);
| | ------------------------ recursive call site | | ------------------------ recursive call site
LL | |
LL | | } LL | | }
| |_^ cannot return without recursing | |_^ cannot return without recursing
| |
@ -51,7 +52,7 @@ LL | foo_hrtb_bar_not(&mut t);
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^
warning: function cannot return without recursing warning: function cannot return without recursing
--> $DIR/hrtb-perfect-forwarding.rs:49:1 --> $DIR/hrtb-perfect-forwarding.rs:50:1
| |
LL | / fn foo_hrtb_bar_hrtb<T>(mut t: T) LL | / fn foo_hrtb_bar_hrtb<T>(mut t: T)
LL | | where T : for<'a> Foo<&'a isize> + for<'b> Bar<&'b isize> LL | | where T : for<'a> Foo<&'a isize> + for<'b> Bar<&'b isize>

View file

@ -1,10 +1,13 @@
error: lifetime may not live long enough error: lifetime may not live long enough
--> $DIR/error-handling.rs:13:56 --> $DIR/error-handling.rs:23:16
| |
LL | fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { LL | fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
| -- -- lifetime `'b` defined here ^^^^^^^^^ opaque type requires that `'a` must outlive `'b` | -- -- lifetime `'b` defined here
| | | |
| lifetime `'a` defined here | lifetime `'a` defined here
...
LL | let _: &'b i32 = *u.0;
| ^^^^^^^ type annotation requires that `'a` must outlive `'b`
| |
= help: consider adding the following bound: `'a: 'b` = help: consider adding the following bound: `'a: 'b`

View file

@ -72,6 +72,8 @@ LL | (x, x)
| |
= help: consider adding the following bound: `'a: 'c` = help: consider adding the following bound: `'a: 'c`
help: add bound `'a: 'b + 'c`
error: lifetime may not live long enough error: lifetime may not live long enough
--> $DIR/outlives-suggestion-simple.rs:31:9 --> $DIR/outlives-suggestion-simple.rs:31:9
| |
@ -106,16 +108,16 @@ LL | self.x
| |
= help: consider adding the following bound: `'b: 'a` = help: consider adding the following bound: `'b: 'a`
error[E0521]: borrowed data escapes outside of function error[E0521]: borrowed data escapes outside of associated function
--> $DIR/outlives-suggestion-simple.rs:73:9 --> $DIR/outlives-suggestion-simple.rs:73:9
| |
LL | fn get_bar(&self) -> Bar2 { LL | fn get_bar(&self) -> Bar2 {
| ----- | -----
| | | |
| `self` is declared here, outside of the function body | `self` declared here, outside of the associated function body
| `self` is a reference that is only valid in the function body | `self` is a reference that is only valid in the associated function body
LL | Bar2::new(&self) LL | Bar2::new(&self)
| ^^^^^^^^^^^^^^^^ `self` escapes the function body here | ^^^^^^^^^^^^^^^^ `self` escapes the associated function body here
error: aborting due to 10 previous errors error: aborting due to 10 previous errors

View file

@ -50,7 +50,7 @@ error[E0521]: borrowed data escapes outside of closure
--> $DIR/closure-substs.rs:29:9 --> $DIR/closure-substs.rs:29:9
| |
LL | |x: &i32, b: fn(&'static i32)| { LL | |x: &i32, b: fn(&'static i32)| {
| - - `b` is declared here, outside of the closure body | - - `b` declared here, outside of the closure body
| | | |
| `x` is a reference that is only valid in the closure body | `x` is a reference that is only valid in the closure body
LL | b(x); LL | b(x);