about summary refs log tree commit diff
path: root/src/test/ui/linkage-attr
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-435/+0
2022-12-05Support Option and similar enums as type of static variable with linkage ↵Peter Collingbourne-2/+3
attribute. Compiler MCP: https://github.com/rust-lang/compiler-team/issues/565
2022-12-05Move linkage type check to HIR analysis and fix semantics issues.Peter Collingbourne-26/+10
This ensures that the error is printed even for unused variables, as well as unifying the handling between the LLVM and GCC backends. This also fixes unusual behavior around exported Rust-defined variables with linkage attributes. With the previous behavior, it appears to be impossible to define such a variable such that it can actually be imported and used by another crate. This is because on the importing side, the variable is required to be a pointer, but on the exporting side, the type checker rejects static variables of pointer type because they do not implement `Sync`. Even if it were possible to import such a type, it appears that code generation on the importing side would add an unexpected additional level of pointer indirection, which would break type safety. This highlighted that the semantics of linkage on Rust-defined variables is different to linkage on foreign items. As such, we now model the difference with two different codegen attributes: linkage for Rust-defined variables, and import_linkage for foreign items. This change gives semantics to the test src/test/ui/linkage-attr/auxiliary/def_illtyped_external.rs which was previously expected to fail to compile. Therefore, convert it into a test that is expected to successfully compile. The update to the GCC backend is speculative and untested.
2022-11-27Stabilize native library modifier `verbatim`Vadim Petrochenkov-25/+24
2022-10-01bless ui testsMaybe Waffle-1/+1
2022-08-26Implementation of import_name_typeDaniel Paoliello-4/+4
2022-07-27Fix linkage-attr/issue-10755.rs ui test on WSLNilstrieb-1/+4
It checked for a "not found", but on WSL with appendWindowsPath=true, PermissionDenied is the error instead.
2022-07-01Shorten def_span for more items.Camille GILLOT-5/+5
2022-05-15rustc: Stricter checking for #[link] attributesVadim Petrochenkov-31/+216
2021-11-18Move some tests to more reasonable directoriesCaio-0/+24
2021-11-14Move some tests to more reasonable directoriesCaio-0/+36
2021-04-17Move some tests to more reasonable directories - 6Caio-0/+31
2021-04-09Auto merge of #81942 - the8472:reduce-ui-test-threads, r=Mark-Simulacrumbors-2/+5
reduce threads spawned by ui-tests The test harness already spawns enough tests to keep all cores busy. Individual tests should keep their own threading to a minimum to avoid context switch overhead. When running ui tests with lld enabled this shaves about 10% off that testsuite on my machine. Resolves #81946
2021-04-09reduce threads spawned by ui-testsThe8472-2/+5
the test harness already spawns enough tests for all cores, individual tests should keep their own threading to a minimum to avoid context switch overhead some tests fail with 1 CGU, so explicit compile flags have been added to keep their old behavior
2021-04-03Remove attribute `#[link_args]`Vadim Petrochenkov-14/+0
2021-01-13Update tests for extern block lintingMark Rousskov-19/+21
2020-12-29Remove `compile-fail` test suiteVadim Petrochenkov-0/+21
2020-04-30A test now fails during check instead of buildOliver Scherer-1/+1
2020-02-09--bless --compare-mode=nllMatthias Prechtl-1/+1
2019-12-21rework run-fail and support check,build-failMazdak Farrokhzad-3/+11
2019-07-09normalize use of backticks in compiler messages for libsyntax/feature_gateSamy Kacimi-1/+1
https://github.com/rust-lang/rust/issues/60532
2019-05-27Tests for external linkage symbol collision check.Felix S. Klock II-0/+67
Fix #61232
2019-05-27Regression test for issue #59548.Felix S. Klock II-0/+23
2019-05-27Refine the message to at least *mention* the attribute itself.Felix S. Klock II-2/+2
Update pre-existing test's diagnostic output accordingly.
2019-05-27Move existing `#[linkage]` tests to a subdirectory where I can add more tests.Felix S. Klock II-0/+62