about summary refs log tree commit diff
path: root/src/test/ui/auxiliary
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-515/+0
2022-11-03Move some tests from `src/test/ui` to more reasonable placesDeadbeef-15/+0
2022-10-20Add ui test to ensure attributes generated from macros are kept as expectedGuillaume Gomez-0/+15
2022-03-28Remove duplicated and unused test filesCaio-36/+0
2021-11-18Move some tests to more reasonable directoriesCaio-166/+0
2021-11-14Move some tests to more reasonable directoriesCaio-119/+0
2021-11-06Move some tests to more reasonable directoriesCaio-65/+0
2021-09-15Move some tests to more reasonable directoriesCaio-181/+0
2021-08-13Auto merge of #86492 - hyd-dev:no-mangle-method, r=petrochenkovbors-0/+21
Associated functions that contain extern indicator or have `#[rustc_std_internal_symbol]` are reachable Previously these fails to link with ``undefined reference to `foo'``: <details> <summary>Example 1</summary> ```rs struct AssocFn; impl AssocFn { #[no_mangle] fn foo() {} } fn main() { extern "Rust" { fn foo(); } unsafe { foo() } } ``` ([Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=f1244afcdd26e2a28445f6e82ca46b50)) </details> <details> <summary>Example 2</summary> ```rs #![crate_name = "lib"] #![crate_type = "lib"] struct AssocFn; impl AssocFn { #[no_mangle] fn foo() {} } ``` ```rs extern crate lib; fn main() { extern "Rust" { fn foo(); } unsafe { foo() } } ``` </details> But I believe they should link successfully, because this works: <details> ```rs #[no_mangle] fn foo() {} fn main() { extern "Rust" { fn foo(); } unsafe { foo() } } ``` ([Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=789b3f283ee6126f53939429103ed98d)) </details> This PR fixes the problem, by adding associated functions that have "custom linkage" to `reachable_set`, just like normal functions. I haven't tested whether #76211 and [Miri](https://github.com/rust-lang/miri/issues/1837) are fixed by this PR yet, but I'm submitting this anyway since this fixes the examples above. I added a `run-pass` test that combines my two examples above, but I'm not sure if that's the right way to test this. Maybe I should add / modify an existing codegen test (`src/test/codegen/export-no-mangle.rs`?) instead?
2021-08-12Silence non_fmt_panic from external macros.Mara Bos-0/+3
2021-08-12Adjust `#[no_mangle]`-related checks and lints for `impl` itemshyd-dev-0/+11
2021-08-12Add associated functions that have custom linkage to `reachable_set`hyd-dev-0/+10
2021-02-23Add #[rustc_legacy_const_generics]Amanieu d'Antras-0/+6
2021-01-13Update code to account for extern ABI requirementMark Rousskov-2/+2
2021-01-13Update tests for extern block lintingMark Rousskov-3/+3
2021-01-01Move rmeta-related testsYuki Okushi-30/+0
2021-01-01Move builtin-superkinds-related testsYuki Okushi-8/+0
2020-12-07Move some tests to subdirectoriesVadim Petrochenkov-8/+0
2020-10-29Add test for panic_fmt lint with external panic!()-calling macro.Mara Bos-0/+6
2020-10-29Test building of libraries with rustc logging enabledTomasz Miąsko-0/+1
2020-10-22Bump LLVM for DeadArgElim fixAaron Hill-0/+29
Fixes #76387 Pulls in https://github.com/rust-lang/llvm-project/pull/82
2020-10-04Add regression test for issue #72470Aaron Hill-0/+175
This was fixed with the upgrade to LLVM 11 in #73526. It seems extremely unlikey that this exact issue will ever reoccur, since slight modifications to the code caused the crash to stop happening. However, it can't hurt to have a test for it.
2020-09-20Remove MMX from RustMateusz Mikuła-2/+2
2020-05-03Stabilize fn-like proc macros in expression, pattern and statement positionsVadim Petrochenkov-3/+1
2020-04-29Store LLVM bitcode in object files, not compressedAlex Crichton-0/+6
This commit is an attempted resurrection of #70458 where LLVM bitcode emitted by rustc into rlibs is stored into object file sections rather than in a separate file. The main rationale for doing this is that when rustc emits bitcode it will no longer use a custom compression scheme which makes it both easier to interoperate with existing tools and also cuts down on compile time since this compression isn't happening. The blocker for this in #70458 turned out to be that native linkers didn't handle the new sections well, causing the sections to either trigger bugs in the linker or actually end up in the final linked artifact. This commit attempts to address these issues by ensuring that native linkers ignore the new sections by inserting custom flags with module-level inline assembly. Note that this does not currently change the API of the compiler at all. The pre-existing `-C bitcode-in-rlib` flag is co-opted to indicate whether the bitcode should be present in the object file or not. Finally, note that an important consequence of this commit, which is also one of its primary purposes, is to enable rustc's `-Clto` bitcode loading to load rlibs produced with `-Clinker-plugin-lto`. The goal here is that when you're building with LTO Cargo will tell rustc to skip codegen of all intermediate crates and only generate LLVM IR. Today rustc will generate both object code and LLVM IR, but the object code is later simply thrown away, wastefully.
2020-01-23rustc: Allow cdylibs to link against dylibsMatthew Maurer-1/+0
Previously, rustc mandated that cdylibs could only link against rlibs as dependencies (not dylibs). This commit disables that restriction and tests that it works in a simple case.
2019-12-21Require issue = "none" over issue = "0" in unstable attributesRoss MacArthur-1/+1
2019-08-27proc_macro: Turn `quote` into a regular built-in macroVadim Petrochenkov-0/+2
Previously in was implemented using a special hack in the metadata loader
2019-08-15Group all ui tests and move to abi #62593Kevin Per-47/+0
2019-07-27tests: Move run-pass tests with naming conflicts to uiVadim Petrochenkov-0/+8
2019-07-27tests: Move run-pass tests without naming conflicts to uiVadim Petrochenkov-0/+651
2019-05-24Add auxiliary issue filevarkor-18/+0
2019-04-22Remove double trailing newlinesvarkor-1/+0
2019-04-12Handle edge cases.David Wood-0/+10
This commit introduces more dirty span manipulation into the compiler in order to handle the various edge cases in moving/renaming the macro import so it is at the root of the import.
2019-04-07Add test with current behaviour.David Wood-0/+8
This commit adds a test demonstrating the current behaviour when a macro defined in a module with the `#[macro_export]` is imported from the module rather than the crate root.
2019-03-21Move one test from run-make-fulldeps to uiVadim Petrochenkov-0/+8
2019-03-14Moved issue tests to subdirs and normalised names.Alexander Regueiro-29/+0
2018-12-25Remove licensesMark Rousskov-201/+0
2018-12-09Move some tests from ui-fulldeps to uiVadim Petrochenkov-0/+183
2018-10-05Move conditional configuration related UI tests into their own directoryHavvy (Ryan Scheel)-20/+0
2018-08-14Moved problematic tests on Windows back to compile-fail.David Wood-45/+0
2018-08-14Merged migrated compile-fail tests and ui tests. Fixes #46841.David Wood-539/+164
2018-08-05Fix 2018 edition testsvarkor-1/+0
2018-08-05Fix run-pass-fulldeps testsvarkor-1/+0
2018-08-05Fix test/uivarkor-4/+4
2018-08-01resolve: Implement prelude search for macro pathsVadim Petrochenkov-0/+5
resolve/expansion: Implement tool attributes
2018-07-19Auto merge of #52024 - oli-obk:existential_parse, r=nikomatsakisbors-0/+47
Implement existential types (not for associated types yet) r? @nikomatsakis cc @Centril @varkor @alexreg
2018-07-18Implement existential typesOliver Schneider-0/+47
2018-07-17Make `async_idents` an edition incompat lintOliver Schneider-0/+2
2018-06-26add edition compiletest header + fix testsmark-2/+2