about summary refs log tree commit diff
path: root/src/test/ui/panic-handler
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-293/+0
2022-11-13Ensure codegen_fn_attrs during collection.Camille GILLOT-7/+1
2022-09-23Repair stderr test result to added lineFlorian Bartels-1/+1
2022-09-23ignore test cases when checking emscriptenFlorian Bartels-0/+1
2022-09-23Adapt test resultsFlorian Bartels-1/+1
2022-09-23Restore ignore tagFlorian Bartels-1/+0
This test case actually requires std::process.
2022-07-20Use FxIndexMap instead of otherwise unused StableMap for WEAK_ITEMS_REFS.Michael Woerister-2/+2
2022-03-28Remove duplicated and unused test filesCaio-0/+15
2021-12-14Suggest to specify a target triple when eh_personality lang item is missingLucas Kent-0/+3
2021-05-06Add needs-unwind to testsTyler Mandry-1/+2
2021-01-01Bless ui testsoli-2/+2
2020-12-29Remove `compile-fail` test suiteVadim Petrochenkov-0/+80
2020-08-22Use smaller def span for functionsAaron Hill-17/+8
Currently, the def span of a funtion encompasses the entire function signature and body. However, this is usually unnecessarily verbose - when we are pointing at an entire function in a diagnostic, we almost always want to point at the signature. The actual contents of the body tends to be irrelevant to the diagnostic we are emitting, and just takes up additional screen space. This commit changes the `def_span` of all function items (freestanding functions, `impl`-block methods, and `trait`-block methods) to be the span of the signature. For example, the function ```rust pub fn foo<T>(val: T) -> T { val } ``` now has a `def_span` corresponding to `pub fn foo<T>(val: T) -> T` (everything before the opening curly brace). Trait methods without a body have a `def_span` which includes the trailing semicolon. For example: ```rust trait Foo { fn bar(); }``` the function definition `Foo::bar` has a `def_span` of `fn bar();` This makes our diagnostic output much shorter, and emphasizes information that is relevant to whatever diagnostic we are reporting. We continue to use the full span (including the body) in a few of places: * MIR building uses the full span when building source scopes. * 'Outlives suggestions' use the full span to sort the diagnostics being emitted. * The `#[rustc_on_unimplemented(enclosing_scope="in this scope")]` attribute points the entire scope body. * The 'unconditional recursion' lint uses the full span to show additional context for the recursive call. All of these cases work only with local items, so we don't need to add anything extra to crate metadata.
2020-06-30Switch crate_extern_paths to a query, and tweak wording.Eric Huss-1/+1
2020-06-30Provide more information on duplicate lang item error.Eric Huss-2/+5
2020-01-24Normalise notes with the/isvarkor-2/+2
2020-01-12Diagnostics should not end with a full stopvarkor-6/+6
2019-09-27getting more context for duplicate lang items (fixes #60561)Tomas Tauber-1/+1
Where possible, the error message includes the name of the crate that brought in the crate with duplicate lang items (which helps with debugging). This information is passed on from cstore using the `extern_crate` query.
2019-03-11Update testsVadim Petrochenkov-7/+7
2018-12-25Remove licensesMark Rousskov-100/+10
2018-12-04Update testsOliver Scherer-2/+2
2018-10-11Extend lang items to assert correct target.David Wood-0/+29
This commit extends the existing lang items functionality to assert that the `#[lang_item]` attribute is only found on the appropriate item for any given lang item. That is, language items representing traits must only ever have their corresponding attribute placed on a trait, for example.
2018-09-07stabilize `#[panic_handler]`Jorge Aparicio-17/+9
2018-08-30Point at def span on incorrect panic or alloc error handlerEsteban Küber-4/+2
2018-08-26rustc: Continue to tweak "std internal symbols"Alex Crichton-1/+7
In investigating [an issue][1] with `panic_implementation` defined in an executable that's optimized I once again got to rethinking a bit about the `rustc_std_internal_symbol` attribute as well as weak lang items. We've sort of been non-stop tweaking these items ever since their inception, and this continues to the trend. The crux of the bug was that in the reachability we have a [different branch][2] for non-library builds which meant that weak lang items (and std internal symbols) weren't considered reachable, causing them to get eliminiated by ThinLTO passes. The fix was to basically tweak that branch to consider these symbols to ensure that they're propagated all the way to the linker. Along the way I've attempted to erode the distinction between std internal symbols and weak lang items by having weak lang items automatically configure fields of `CodegenFnAttrs`. That way most code no longer even considers weak lang items and they're simply considered normal functions with attributes about the ABI. In the end this fixes the final comment of #51342 [1]: https://github.com/rust-lang/rust/issues/51342#issuecomment-414368019 [2]: https://github.com/rust-lang/rust/blob/35bf1ae25799a4e62131159f052e0a3cbd27c960/src/librustc/middle/reachable.rs#L225-L238
2018-08-23add #[panic_handler]; deprecate #[panic_implementation]Jorge Aparicio-0/+271