about summary refs log tree commit diff
path: root/tests/ui-fulldeps/rustc-dev-remap.rs
blob: aae7d4c0c90d1d262a4dc41e2dfbe45b11dcb7df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//@ check-fail
//
//@ ignore-stage1
//@ ignore-cross-compile
//@ ignore-remote
//
//@ revisions: only-remap remap-unremap
//@ compile-flags: -Z simulate-remapped-rust-src-base=/rustc-dev/xyz
//@ [remap-unremap]compile-flags: -Ztranslate-remapped-path-to-local-path=yes

// The $SRC_DIR*.rs:LL:COL normalisation doesn't kick in automatically
// as the remapped revision will begin with $COMPILER_DIR_REAL,
// so we have to do it ourselves.
//@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:COL"

#![feature(rustc_private)]

extern crate rustc_ast;

use rustc_ast::visit::Visitor;

struct MyStruct;
struct NotAValidResultType;

impl Visitor<'_> for MyStruct {
    type Result = NotAValidResultType;
    //~^ ERROR the trait bound `NotAValidResultType: VisitorResult` is not satisfied
}

fn main() {}