Auto merge of #50454 - Manishearth:edition-preview-fixes, r=alexcrichton

Various edition preview fixes

Implement a bunch of things discussed in the meeting.
This commit is contained in:
bors 2018-05-07 14:54:17 +00:00
commit 565235ee7e
14 changed files with 53 additions and 24 deletions

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// compile-flags: --edition=2018 -Zunstable-options
#![feature(extern_absolute_paths)]
use xcrate::S; //~ ERROR can't find crate for `xcrate`

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// compile-flags: --edition=2018 -Zunstable-options
#![feature(extern_absolute_paths)]
fn main() {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// compile-flags: --edition=2018 -Zunstable-options
#![feature(extern_absolute_paths)]
use ycrate; //~ ERROR can't find crate for `ycrate`

View file

@ -9,6 +9,7 @@
// except according to those terms.
// aux-build:xcrate.rs
// compile-flags: --edition=2018 -Zunstable-options
#![feature(crate_in_paths)]
#![feature(extern_absolute_paths)]

View file

@ -1,9 +1,9 @@
-include ../tools.mk
all: extern_absolute_paths.rs extern_in_paths.rs krate2
$(RUSTC) extern_absolute_paths.rs -Zsave-analysis
$(RUSTC) extern_absolute_paths.rs -Zsave-analysis --edition=2018
cat $(TMPDIR)/save-analysis/extern_absolute_paths.json | "$(PYTHON)" validate_json.py
$(RUSTC) extern_in_paths.rs -Zsave-analysis
$(RUSTC) extern_in_paths.rs -Zsave-analysis --edition=2018
cat $(TMPDIR)/save-analysis/extern_in_paths.json | "$(PYTHON)" validate_json.py
krate2: krate2.rs

View file

@ -9,6 +9,7 @@
// except according to those terms.
// aux-build:xcrate.rs
// compile-flags: --edition=2018 -Zunstable-options
#![feature(extern_absolute_paths)]

View file

@ -12,7 +12,7 @@
//
// Regression test for #47075.
// compile-flags: --test
// compile-flags: --test --edition=2018 -Zunstable-options
#![feature(extern_absolute_paths)]