about summary refs log tree commit diff
path: root/src/test/ui/rfcs
AgeCommit message (Collapse)AuthorLines
2020-11-22Drop support for cloudabi targetsLzu Tao-1/+0
2020-10-22Fixup: add missing trailing newlineLeSeulArtichaut-1/+1
2020-10-22Make closures inherit the parent function's target featuresLeSeulArtichaut-0/+18
2020-09-02pretty: trim paths of unique symbolsDan Aloni-18/+18
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-08-22Use smaller def span for functionsAaron Hill-2/+2
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-08-15Fix RFC-1014 testTomasz Miąsko-2/+4
Use two printlns when testing that writing to a closed stdout does not panic. Otherwise the test is ineffective, since the current implementation silently ignores the error during first println regardless.
2020-07-23Add missing backticks in diagnostics noteYuki Okushi-6/+6
2020-06-30Make #[target_feature] Fn trait error message less confusingCaleb Zulawski-6/+6
2020-06-27Don't implement Fn* for unsafe #[target_feature] functionsCaleb Zulawski-0/+3
2020-06-13Add error note when trying fn as Fn traitCaleb Zulawski-4/+53
2020-06-13Don't implement Fn* traits for #[target_feature] functionsCaleb Zulawski-0/+63
2020-05-01Add new tests and bless old testsLeSeulArtichaut-0/+260
2020-01-18slice_patterns: remove gates in testsMazdak Farrokhzad-1/+0
2020-01-15Remove unused auxiliary file that was replaced with rust_test_helpersTomasz Miąsko-5/+0
2019-10-25Re-enable Emscripten's exception handling supportThomas Lively-1/+1
Passes LLVM codegen and Emscripten link-time flags for exception handling if and only if the panic strategy is `unwind`. Sets the default panic strategy for Emscripten targets to `unwind`. Re-enables tests that depend on unwinding support for Emscripten, including `should_panic` tests.
2019-10-19Rollup merge of #64007 - estebank:overlapping-patterns, r=matthewjasperMazdak Farrokhzad-1/+1
Add check for overlapping ranges to unreachable patterns lint Fix #63987.
2019-10-16Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-1/+1
- Compatible with Emscripten 1.38.46-upstream or later upstream. - Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the old incorrect wasm32 C call ABI with the correct one, preserving the old one as wasm32_bindgen_compat for wasm-bindgen compatibility. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Uses EMCC_CFLAGS on CI to avoid the timeout problems with #63649.
2019-10-16Only emit overlapping patterns lint if the overlap is partialEsteban Küber-1/+1
2019-10-05Revert "Auto merge of #63649 - tlively:emscripten-upstream-upgrade, ↵Tyler Mandry-1/+1
r=alexcrichton" This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.
2019-10-04Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-1/+1
- Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the incorrect wasm32 C call ABI with the old asmjs version, which is correct for both wasm32 and JS. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Temporarily makes Emscripten targets use panic=abort by default because supporting unwinding will require an LLVM patch.
2019-07-28Use new 'p @ ..' syntax in tests.Mazdak Farrokhzad-1/+1
2019-07-27tests: Move run-pass tests without naming conflicts to uiVadim Petrochenkov-0/+1273