Add regression test for #18943

Closes #18943.
This commit is contained in:
Johannes Oertel 2015-05-02 13:26:06 +02:00
parent 2595b1e282
commit 2cf47917ab
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,7 @@
-include ../tools.mk
# Regression test for ICE #18943 when compiling as lib
all:
$(RUSTC) foo.rs --crate-type lib
$(call REMOVE_RLIBS,foo) && exit 0 || exit 1

View File

@ -0,0 +1,16 @@
// Copyright 2015 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.
trait Foo { }
trait Bar { }
impl<'a> Foo for Bar + 'a { }