about summary refs log tree commit diff
path: root/src/test/ui/invalid
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-473/+0
2022-12-08Add LLVM KCFI support to the Rust compilerRamon de C Valle-1/+1
This commit adds LLVM Kernel Control Flow Integrity (KCFI) support to the Rust compiler. It initially provides forward-edge control flow protection for operating systems kernels for Rust-compiled code only by aggregating function pointers in groups identified by their return and parameter types. (See llvm/llvm-project@cff5bef.) Forward-edge control flow protection for C or C++ and Rust -compiled code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code share the same virtual address space) will be provided in later work as part of this project by identifying C char and integer type uses at the time types are encoded (see Type metadata in the design document in the tracking issue #89653). LLVM KCFI can be enabled with -Zsanitizer=kcfi. Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
2022-09-25Rollup merge of #101997 - cuviper:drop-legacy-pm, r=nikicfee1-dead-1/+1
Remove support for legacy PM This removes support for optimizing with LLVM's legacy pass manager, as well as the unstable `-Znew-llvm-pass-manager` option. We have been defaulting to the new PM since LLVM 13 (except for s390x that waited for 14), and LLVM 15 removed support altogether. The only place we still use the legacy PM is for writing the output file, just like `llc` does. cc #74705 r? ``@nikic``
2022-09-18Remove -Znew-llvm-pass-managerJosh Stone-1/+1
2022-09-16add help for invalid inline argumentRageking8-18/+6
2022-07-25passes: port more of `check_attr` moduleDavid Wood-6/+6
Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-20Add ShadowCallStack SupportIvan Lozano-1/+1
Adds support for the LLVM ShadowCallStack sanitizer.
2022-05-24Add support for embedding pretty printers via the `#[debugger_visualizer]` ↵ridwanabdillahi-5/+15
attribute. Add tests for embedding pretty printers and update documentation. Ensure all error checking for `#[debugger_visualizer]` is done up front and not when the `debugger_visualizer` query is run. Clean up potential ODR violations when embedding pretty printers into the `__rustc_debug_gdb_scripts_section__` section. Respond to PR comments and update documentation.
2022-05-03Add support for a new attribute `#[debugger_visualizer]` to support ↵ridwanabdillahi-0/+27
embedding debugger visualizers into a generated PDB. Cleanup `DebuggerVisualizerFile` type and other minor cleanup of queries. Merge the queries for debugger visualizers into a single query. Revert move of `resolve_path` to `rustc_builtin_macros`. Update dependencies in Cargo.toml for `rustc_passes`. Respond to PR comments. Load visualizer files into opaque bytes `Vec<u8>`. Debugger visualizers for dynamically linked crates should not be embedded in the current crate. Update the unstable book with the new feature. Add the tracking issue for the debugger_visualizer feature. Respond to PR comments and minor cleanups.
2022-03-07Do not allow `#[rustc_legacy_const_generics]` on methodsChayim Refael Friedman-3/+16
It caused an ICE since `item` was `None`.
2022-02-16MemTagSanitizer SupportIvan Lozano-1/+1
Adds support for the LLVM MemTagSanitizer.
2021-09-25Check for macros in built-in attributes that don't support them.Eric Huss-0/+15
2021-08-21Remove `Session.used_attrs` and move logic to `CheckAttrVisitor`Aaron Hill-10/+3
Instead of updating global state to mark attributes as used, we now explicitly emit a warning when an attribute is used in an unsupported position. As a side effect, we are to emit more detailed warning messages (instead of just a generic "unused" message). `Session.check_name` is removed, since its only purpose was to mark the attribute as used. All of the callers are modified to use `Attribute.has_name` Additionally, `AttributeType::AssumedUsed` is removed - an 'assumed used' attribute is implemented by simply not performing any checks in `CheckAttrVisitor` for a particular attribute. We no longer emit unused attribute warnings for the `#[rustc_dummy]` attribute - it's an internal attribute used for tests, so it doesn't mark sense to treat it as 'unused'. With this commit, a large source of global untracked state is removed.
2021-05-12entirely remove rustc_args_required_const attributeRalf Jung-92/+0
2021-05-08Support -C passes in NewPMNikita Popov-0/+8
And report an error if parsing the additional pass pipeline fails. Threading through the error accounts for most of the changes here.
2021-03-16Use delay_span_bug instead of panic in layout_scalar_valid_rangeTomasz Miąsko-1/+14
83054 introduced validation of scalar range attributes, but panicking code that uses the attribute remained reachable. Use `delay_span_bug` instead to avoid the ICE.
2021-03-11Validate rustc_layout_scalar_valid_range_{start,end} attributesTomasz Miąsko-0/+54
2021-02-25Improve checking for attributeAmanieu d'Antras-16/+29
2021-02-25Fix testsAmanieu d'Antras-4/+12
2021-02-25Address review commentsAmanieu d'Antras-0/+3
2021-02-23Move tests to subdirectoryAmanieu d'Antras-0/+193
2021-02-07HWASan supportTri Vo-1/+1
2020-04-11rustc: Add a warning count upon completionRoccoDev-1/+1
2020-02-05Selectively disable sanitizer instrumentationTomasz Miąsko-0/+15
Add `no_sanitize` attribute that allows to opt out from sanitizer instrumentation in an annotated function.
2020-01-24Normalise notes with the/isvarkor-1/+1
2019-12-12Move `allow_c_varadic` logic to `ast_validation`.Mazdak Farrokhzad-18/+0
2019-11-06Remove "here" from "expected one of X here"Esteban Küber-1/+1
2019-10-31Update ui testsGuillaume Gomez-1/+2
2019-10-17Plugins deprecation: don’t suggest simply removing the attributeSimon Sapin-2/+2
Building Servo with a recent Nightly produces: ```rust warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597 --> components/script/lib.rs:14:1 | 14 | #![plugin(script_plugins)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute | = note: `#[warn(deprecated)]` on by default ``` First, linking to https://github.com/rust-lang/rust/issues/29597 is not ideal since there is pretty much no discussion there of the deprecation and what can be used instead. This PR changes the link to the deprecation PR which does have more discussion. Second, the “remove this attribute” suggestion is rather unhelpful. Just because a feature is deprecated doesn’t mean that simply removing its use without a replacement is acceptable. In the case of custom lint, there is no replacement available. Prefixing a message with “help:” when telling users that they’re screwed honestly feels disrespectful. This PR also changes the message to be more factual.
2019-10-03plugin_registrary: use normal deprecation instead of hard coded warning.Mazdak Farrokhzad-8/+6
2019-10-03Deprecate `#![plugin]` and `#[plugin_registrar]`.Mazdak Farrokhzad-3/+14
2019-07-21normalize use of backticks in compiler messages for librustc_lintSamy Kacimi-1/+1
2019-07-17normalize use of backticks in compiler messages for librustc/lintSamy Kacimi-1/+1
https://github.com/rust-lang/rust/issues/60532
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-1/+1
2019-03-23Tweak spans for E0599Esteban Küber-3/+1
2019-03-11Update testsVadim Petrochenkov-7/+7
2019-02-27Rename variadic to c_variadicDan Robertson-2/+2
Function signatures with the `variadic` member set are actually C-variadic functions. Make this a little more explicit by renaming the `variadic` boolean value, `c_variadic`.
2018-12-26Fixed more tests.Alexander Regueiro-2/+4
2018-12-25Remove licensesMark Rousskov-78/+19
2018-09-13Suggest valid crate type if invalidPhilipp Hansch-3/+93
This adds a suggestion to the `invalid_crate_types` lint. The suggestion is based on the Levenshtein distance to existing crate types. If no suggestion is found it will show the lint without any suggestions.
2018-08-14Merged migrated compile-fail tests and ui tests. Fixes #46841.David Wood-0/+189