diff --git a/src/test/run-make-fulldeps/save-analysis-rfc2126/Makefile b/src/test/run-make-fulldeps/save-analysis-rfc2126/Makefile new file mode 100644 index 0000000000000..2f5ed6716d645 --- /dev/null +++ b/src/test/run-make-fulldeps/save-analysis-rfc2126/Makefile @@ -0,0 +1,8 @@ +-include ../tools.mk + +all: extern_absolute_paths.rs extern_in_paths.rs krate2 + $(RUSTC) extern_absolute_paths.rs -Zsave-analysis + $(RUSTC) extern_in_paths.rs -Zsave-analysis + +krate2: krate2.rs + $(RUSTC) $< diff --git a/src/test/run-make-fulldeps/save-analysis-rfc2126/extern_absolute_paths.rs b/src/test/run-make-fulldeps/save-analysis-rfc2126/extern_absolute_paths.rs new file mode 100644 index 0000000000000..b1fe535766d21 --- /dev/null +++ b/src/test/run-make-fulldeps/save-analysis-rfc2126/extern_absolute_paths.rs @@ -0,0 +1,18 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(extern_absolute_paths)] + +use krate2::hello; + +fn main() { + hello(); + ::krate2::hello(); +} diff --git a/src/test/run-make-fulldeps/save-analysis-rfc2126/extern_in_paths.rs b/src/test/run-make-fulldeps/save-analysis-rfc2126/extern_in_paths.rs new file mode 100644 index 0000000000000..e48627e86bac5 --- /dev/null +++ b/src/test/run-make-fulldeps/save-analysis-rfc2126/extern_in_paths.rs @@ -0,0 +1,17 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(extern_in_paths)] + +use extern::krate2; + +fn main() { + extern::krate2::hello(); +} diff --git a/src/test/run-make-fulldeps/save-analysis-rfc2126/krate2.rs b/src/test/run-make-fulldeps/save-analysis-rfc2126/krate2.rs new file mode 100644 index 0000000000000..21fc57ccdf2de --- /dev/null +++ b/src/test/run-make-fulldeps/save-analysis-rfc2126/krate2.rs @@ -0,0 +1,15 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![crate_name = "krate2"] +#![crate_type = "lib"] + +pub fn hello() { +}