rustc_privacy: visit Ty instead of HIR types in EmbargoVisitor.
This commit is contained in:
parent
9aaf26e7aa
commit
36d33d6b71
8 changed files with 227 additions and 167 deletions
15
src/test/run-pass/impl-trait/auxiliary/xcrate.rs
Normal file
15
src/test/run-pass/impl-trait/auxiliary/xcrate.rs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2016 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(conservative_impl_trait)]
|
||||
|
||||
pub fn fourway_add(a: i32) -> impl Fn(i32) -> impl Fn(i32) -> impl Fn(i32) -> i32 {
|
||||
move |b| move |c| move |d| a + b + c + d
|
||||
}
|
||||
17
src/test/run-pass/impl-trait/xcrate.rs
Normal file
17
src/test/run-pass/impl-trait/xcrate.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2016 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.
|
||||
|
||||
// aux-build:xcrate.rs
|
||||
|
||||
extern crate xcrate;
|
||||
|
||||
fn main() {
|
||||
assert_eq!(xcrate::fourway_add(1)(2)(3)(4), 10);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue