about summary refs log tree commit diff
path: root/src/test/ui/rfcs
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-2286/+0
2022-11-03Move some tests from `src/test/ui` to more reasonable placesDeadbeef-0/+187
2022-09-23Restore ignore tagFlorian Bartels-1/+0
This test case actually requires std::process.
2022-08-29Make the trait bound is not satisfied specify kindObei Sideg-6/+6
2022-08-03Warn about dead tuple struct fieldsFabian Wolff-1/+1
2022-07-29fix ICE when computing codegen_fn_attrs on closure with non-fn parentMichael Goulet-0/+9
2022-06-17Subtype FRU fields first in type_changing_struct_updateMichael Goulet-17/+35
2022-06-11Guide inference along during type_changing_struct_updateMichael Goulet-0/+31
2022-04-26Revert "add `DefId` to unsafety violations and display function path in E0133"Oli Scherer-38/+58
This reverts commit 8b8f6653cfd54525714f02efe7af0a0f830e185c.
2022-04-24only show a simple description in E0133 span labelEmil Gardström-20/+20
2022-04-24add `DefId` to unsafety violations and display function path in E0133Emil Gardström-50/+50
this enables consumers to access the function definition that was reported to be unsafe
2022-04-05diagnostics: tweak error message to give more rationale to unsafe FnMichael Howell-3/+3
2022-02-22Stabilize Termination and ExitCodeJane Lusby-2/+0
2021-12-20add test filesSparrowLii-0/+24
2021-12-09Add needs-unwind to tests that depend on panickingDavid Koloski-0/+1
This directive isn't automatically set by compiletest or x.py, but can be turned on manually for targets that require it.
2021-11-05Add feature trigger and enable is_struct checkSparrowLii-1/+11
2021-10-29Add feature trigger and correct `is_struct` checkSparrowLii-16/+17
2021-10-29move the processing part of `base_expr` into `check_expr_struct_fields`SparrowLii-2/+2
2021-10-28implement type-changing-struct-updateSparrowLii-0/+185
put the test dir in test/ui/rfcs
2021-09-26Remove box syntax from most places in src/test outside of the issues direst31-2/+2
2021-09-16Point at call span that introduced obligation for the argEsteban Kuber-6/+18
2021-08-23add Cell::as_array_of_cells, similar to Cell::as_slice_of_cellsJack O'Connor-0/+9
Previously, converting `&mut [T; N]` to `&[Cell<T>; N]` looks like this: let array = &mut [1, 2, 3]; let cells: &[Cell<i32>; 3] = Cell::from_mut(&mut array[..]) .as_slice_of_cells() .try_into() .unwrap(); With this new helper method, it looks like this: let array = &mut [1, 2, 3]; let cells: &[Cell<i32>; 3] = Cell::from_mut(array).as_array_of_cells();
2021-08-16Use note to point at bound introducing requirementEsteban Küber-18/+30
2021-05-20Check for calls to functions with `#[target_feature]` in THIR unsafeckLeSeulArtichaut-11/+120
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