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

Rollup of 13 pull requests #63119

Closed
wants to merge 46 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
fed12fa
Remove mentions of removed `offset_to` method
phil-opp Jun 19, 2019
c9c73f5
Refer to `add` method instead of `offset`
phil-opp Jul 17, 2019
60de9e4
Do not downgrade NLL errors for bind_by_move_pattern_guards when AST …
Centril Jul 27, 2019
8f0b2e5
Remove 'feature(nll)' from bind_by_move_pattern_guards tests.
Centril Jul 27, 2019
b6c472a
Unconditionally set SignalledError::SawSomeError.
Centril Jul 28, 2019
a5a039d
borrowck-mutate-in-guard: update test.
Centril Jul 28, 2019
194282b
borrowck-migrate-to-nll: use #38899 for testing.
Centril Jul 28, 2019
b95b8cc
Add tests for #27282, #31287 as hard errors.
Centril Jul 28, 2019
3dca17e
Disallow duplicate lifetime parameters with legacy hygiene
matthewjasper Jul 28, 2019
8876b3b
Resolve const parameters with modern hygiene
matthewjasper Jul 28, 2019
dfad725
Recover 'for ( $pat in $expr ) $block'.
Centril Jul 24, 2019
1b11860
Use chaining for diagnosics in parser.
Centril Jul 24, 2019
56b39fb
Add 'span_to_snippet' shortcut.
Centril Jul 24, 2019
cd79609
Remove redundant check.
Centril Jul 28, 2019
18bf9dd
Properly check the defining scope of existential types
Aaron1011 Jul 28, 2019
8811b9c
Fix formatting
Aaron1011 Jul 28, 2019
3e98c3a
Rename test and add comment
Aaron1011 Jul 28, 2019
00c83a5
Turn INCOMPLETE_FEATURES into a lint.
Centril Jul 29, 2019
651c178
Allow 'incomplete_features' in libcore/alloc.
Centril Jul 29, 2019
18c5614
--bless tests due to INCOMPLETE_FEATURES being a lint.
Centril Jul 29, 2019
e2ee2a3
Move ui/{existential-type -> existential_types}.
Centril Jul 29, 2019
b2a5d99
Move ui/existential_type.rs -> ui/existential_type/existential_type-p…
Centril Jul 29, 2019
b779f45
Add test for #53678.
Centril Jul 29, 2019
1e927d8
Add test for #60407.
Centril Jul 29, 2019
a54dd23
Add test for #60564.
Centril Jul 29, 2019
0cdd693
vxworks: Remove Linux-specific comments.
josephlr Jul 29, 2019
60680d4
ci: Skip installing SWIG/xz on OSX
alexcrichton Jul 29, 2019
c56d8a8
Add links to None in Option doc
tesuji Jul 29, 2019
624c5da
impl Debug for Chars
max-sixty Jul 26, 2019
3325ff6
comments from @lzutao
max-sixty Jul 29, 2019
8d7fb87
std: Fix a failing `fs` test on Windows
alexcrichton Jul 29, 2019
870efe3
Add very simple edition check to tidy; and add missing edition = 2018s.
crlf0710 Jul 28, 2019
0fb9295
Add another test for const parameter (non) hygiene.
matthewjasper Jul 29, 2019
9cbd831
Rollup merge of #61965 - phil-opp:patch-4, r=scottmcm
Centril Jul 29, 2019
b867bb0
Rollup merge of #62928 - Centril:recover-parens-around-for-head, r=es…
Centril Jul 29, 2019
c91e647
Rollup merge of #63000 - max-sixty:chars-display, r=alexcrichton
Centril Jul 29, 2019
81510c9
Rollup merge of #63059 - Centril:sound-bind-by-move, r=matthewjasper
Centril Jul 29, 2019
16a733b
Rollup merge of #63083 - matthewjasper:parameter-hygiene, r=petrochenkov
Centril Jul 29, 2019
6edff11
Rollup merge of #63087 - crlf0710:tidy_2018, r=Mark-Simulacrum
Centril Jul 29, 2019
e93f9cf
Rollup merge of #63093 - Aaron1011:fix/existential-closure, r=cramertj
Centril Jul 29, 2019
5cddc0a
Rollup merge of #63095 - Centril:incomplete-features-lint, r=varkor
Centril Jul 29, 2019
fe09475
Rollup merge of #63096 - Centril:existential-type-add-tests, r=varkor
Centril Jul 29, 2019
c19fffc
Rollup merge of #63099 - josephlr:vxworks, r=alexcrichton
Centril Jul 29, 2019
259b37e
Rollup merge of #63106 - alexcrichton:remove-swig-osx, r=pietroalbini
Centril Jul 29, 2019
f998b8c
Rollup merge of #63108 - lzutao:option-xor-typo, r=jonas-schievink
Centril Jul 29, 2019
f9cf2d6
Rollup merge of #63109 - alexcrichton:disable-windows-fs-test, r=sfac…
Centril Jul 29, 2019
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
borrowck-migrate-to-nll: use #38899 for testing.
  • Loading branch information
Centril committed Jul 28, 2019
commit 194282bdd9857301ba7d352abdd0dd0d071299ec
18 changes: 9 additions & 9 deletions src/test/ui/borrowck/borrowck-migrate-to-nll.edition.stderr
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
warning[E0507]: cannot move out of `foo` in pattern guard
--> $DIR/borrowck-migrate-to-nll.rs:26:18
warning[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable
--> $DIR/borrowck-migrate-to-nll.rs:28:21
|
LL | (|| { let bar = foo; bar.take() })();
| ^^ ---
| | |
| | move occurs because `foo` has type `&mut std::option::Option<&i32>`, which does not implement the `Copy` trait
| | move occurs due to use in closure
| move out of `foo` occurs here
LL | let x = &mut block;
| ---------- mutable borrow occurs here
LL | let p: &'a u8 = &*block.current;
| ^^^^^^^^^^^^^^^ immutable borrow occurs here
LL | // (use `x` and `p` so enabling NLL doesn't assign overly short lifetimes)
LL | drop(x);
| - mutable borrow later used here
|
= note: variables bound in patterns cannot be moved from until after the end of the pattern guard
= warning: this error has been downgraded to a warning for backwards compatibility with previous releases
= warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
= note: for more information, try `rustc --explain E0729`
26 changes: 14 additions & 12 deletions src/test/ui/borrowck/borrowck-migrate-to-nll.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This is a test of the borrowck migrate mode. It leverages #27282, a
// This is a test of the borrowck migrate mode. It leverages #38899, a
// bug that is fixed by NLL: this code is (unsoundly) accepted by
// AST-borrowck, but is correctly rejected by the NLL borrowck.
//
@@ -18,15 +18,17 @@
//[zflag] run-pass
//[edition] run-pass

fn main() {
match Some(&4) {
None => {},
ref mut foo
if {
(|| { let bar = foo; bar.take() })();
false
} => {},
Some(ref _s) => println!("Note this arm is bogus; the `Some` became `None` in the guard."),
_ => println!("Here is some supposedly unreachable code."),
}
pub struct Block<'a> {
current: &'a u8,
unrelated: &'a u8,
}

fn bump<'a>(mut block: &mut Block<'a>) {
let x = &mut block;
let p: &'a u8 = &*block.current;
// (use `x` and `p` so enabling NLL doesn't assign overly short lifetimes)
drop(x);
drop(p);
}

fn main() {}
18 changes: 9 additions & 9 deletions src/test/ui/borrowck/borrowck-migrate-to-nll.zflag.stderr
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
warning[E0507]: cannot move out of `foo` in pattern guard
--> $DIR/borrowck-migrate-to-nll.rs:26:18
warning[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable
--> $DIR/borrowck-migrate-to-nll.rs:28:21
|
LL | (|| { let bar = foo; bar.take() })();
| ^^ ---
| | |
| | move occurs because `foo` has type `&mut std::option::Option<&i32>`, which does not implement the `Copy` trait
| | move occurs due to use in closure
| move out of `foo` occurs here
LL | let x = &mut block;
| ---------- mutable borrow occurs here
LL | let p: &'a u8 = &*block.current;
| ^^^^^^^^^^^^^^^ immutable borrow occurs here
LL | // (use `x` and `p` so enabling NLL doesn't assign overly short lifetimes)
LL | drop(x);
| - mutable borrow later used here
|
= note: variables bound in patterns cannot be moved from until after the end of the pattern guard
= warning: this error has been downgraded to a warning for backwards compatibility with previous releases
= warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
= note: for more information, try `rustc --explain E0729`