about summary refs log tree commit diff
path: root/src/test/run-pass/inner-static.rs
AgeCommit message (Collapse)AuthorLines
2018-12-25Remove licensesMark Rousskov-10/+0
2015-04-08Remove pretty-expanded from failing testsAlex Crichton-1/+0
This commit removes pretty-expanded from all tests that wind up calling panic! one way or another now that its internals are unstable.
2015-03-23rustdoc: Replace no-pretty-expanded with pretty-expandedBrian Anderson-0/+2
Now that features must be declared expanded source often does not compile. This adds 'pretty-expanded' to a bunch of test cases that still work.
2015-02-18Fallout: tests. As tests frequently elide things, lots of changesNiko Matsakis-3/+3
here. Some of this may have been poorly rebased, though I tried to be careful and preserve the spirit of the test.
2014-04-06Remove check-fast. Closes #4193, #8844, #6330, #7416Brian Anderson-1/+0
2014-02-14extern mod => extern crateAlex Crichton-1/+1
This was previously implemented, and it just needed a snapshot to go through
2014-02-11Change `xfail` directives in compiletests to `ignore`, closes #11363Florian Hahn-2/+2
2013-09-02Remove __extensions__ in names for a "pretty name"Alex Crichton-1/+5
As with the previous commit, this is targeted at removing the possibility of collisions between statics. The main use case here is when there's a type-parametric function with an inner static that's compiled as a library. Before this commit, any impl would generate a path item of "__extensions__". This changes this identifier to be a "pretty name", which is either the last element of the path of the trait implemented or the last element of the type's path that's being implemented. That doesn't quite cut it though, so the (trait, type) pair is hashed and again used to append information to the symbol. Essentially, __extensions__ was removed for something nicer for debugging, and then some more information was added to symbol name by including a hash of the trait being implemented and type it's being implemented for. This should prevent colliding names for inner statics in regular functions with similar names.
2013-09-02Fix inner statics having the same symbol nameAlex Crichton-0/+19
Before, the path name for all items defined in methods of traits and impls never took into account the name of the method. This meant that if you had two statics of the same name in two different methods the statics would end up having the same symbol named (even after mangling) because the path components leading to the symbol were exactly the same (just __extensions__ and the static name). It turns out that if you add the symbol "A" twice to LLVM, it automatically makes the second one "A1" instead of "A". What this meant is that in local crate compilations we never found this bug. Even across crates, this was never a problem. The problem arises when you have generic methods that don't get generated at compile-time of a library. If the statics were re-added to LLVM by a client crate of a library in a different order, you would reference different constants (the integer suffixes wouldn't be guaranteed to be the same). This fixes the problem by adding the method name to symbol path when building the ast_map. In doing so, two symbols in two different methods are disambiguated against.