This commit is contained in:
Shotaro Yamada 2018-04-10 23:40:34 +09:00
parent bbed61d3d2
commit e986510bde
4 changed files with 58 additions and 0 deletions

View file

@ -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) $<

View file

@ -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();
}

View file

@ -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();
}

View 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() {
}