Add test
This commit is contained in:
parent
bbed61d3d2
commit
e986510bde
4 changed files with 58 additions and 0 deletions
|
|
@ -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) $<
|
||||
|
|
@ -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 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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();
|
||||
}
|
||||
|
|
@ -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 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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();
|
||||
}
|
||||
15
src/test/run-make-fulldeps/save-analysis-rfc2126/krate2.rs
Normal file
15
src/test/run-make-fulldeps/save-analysis-rfc2126/krate2.rs
Normal file
|
|
@ -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 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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() {
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue