about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-01-01 02:08:39 +0000
committerbors <bors@rust-lang.org>2019-01-01 02:08:39 +0000
commitd8371c61e65a9287f89730956166aa20765c78c0 (patch)
treee7358769b82e40248db3cc8332216d401d10b823 /src/rustllvm/RustWrapper.cpp
parentfe6a54d2207c9ab2c5eb5aa3c9488d92c7c86bfb (diff)
parent06f22ba427660589c543d6f37c8c45de88d28093 (diff)
downloadrust-d8371c61e65a9287f89730956166aa20765c78c0.tar.gz
rust-d8371c61e65a9287f89730956166aa20765c78c0.zip
Auto merge of #57199 - petrochenkov:ambig, r=estebank
resolve: Simplify treatment of ambiguity errors

If we have a glob conflict like this
```rust
mod m1 { struct S; }
mod m2 { struct S; }

use m1::*;
use m2::*;
```
we treat it as a special "ambiguity item" that's not an error by itself, but produces an error when actually used.
```rust
use m1::*; // primary
use m2::*; // secondary

=>

ambiguity S(m1::S, m2::S);
```

Ambiguity items were *sometimes* treated as their primary items for error recovery, but pretty irregularly.

After this PR they are always treated as their primary items, except that
- If an ambiguity item is marked as used, then it still produces an error.
- Ambiguity items are still filtered away when exported to other crates (which is also a use in some sense).
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions