Closed
Description
In this test case:
// xfail-stage0
// error-pattern:'swap' is glob-imported from multiple different modules
// issue #482
use std;
// expecting swap to be defined in vec
import std::vec::*;
import alternate_supplier::*;
mod alternate_supplier {
fn swap() {}
}
fn main() { swap() }
I get this error:
../src/test/compile-fail/cross-crate-glob-collision.rs:7:10:8:6: note: 'swap' is imported here
../src/test/compile-fail/cross-crate-glob-collision.rs:8:25:10:3: note: 'swap' is imported here
../src/test/compile-fail/cross-crate-glob-collision.rs:14:12:14:17: error: 'swap' is glob-imported from multiple different modules.
The spans for the two imports, while in the general ballpark, are not very exact. I suspect that all types of view items have similar problems with their spans.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
catamorphism commentedon Jul 12, 2011
I fixed this one, but I'm not sure how to add a regression test when the right error message involves having a certain span. If anyone has suggestions, let me know.
brson commentedon Jul 12, 2011
Maybe you could formulate a test where the span is minimally likely to change. Or you could put comments in the test indicated that you're specifically testing for the correct span, so whoever messes with it feels more inclined to update the test. Or you could just skip the test; sometimes that's easiest.
catamorphism commentedon Jul 12, 2011
Yeah, I'm skipping it for now. But the code example is right here in case anyone wants to add it as a test ;-)
Clean up CI configuration and add s390x
Auto merge of rust-lang#652 - alexcrichton:s390xci, r=alexcrichton
Merge pull request rust-lang#650 from RalfJung/influences
Merge pull request rust-lang#650 from bjorn3/simd_emulation
Enabled CBMC unknown language mode test now that rust-lang#533 has be…
Merge pull request rust-lang#650 from rust-lang/sync_from_rust_2025_0…