Implement EII for statics#154193
Conversation
e3f6d77 to
30c073d
Compare
This comment has been minimized.
This comment has been minimized.
30c073d to
dd4e148
Compare
c7aa3cf to
d9d3b13
Compare
|
|
|
Some changes occurred in compiler/rustc_passes/src/check_attr.rs Some changes occurred in compiler/rustc_attr_parsing The parser was modified, potentially altering the grammar of (stable) Rust cc @fmease Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
This comment has been minimized.
This comment has been minimized.
d9d3b13 to
7b3a361
Compare
7b3a361 to
2cb2f25
Compare
|
The fact that |
I have resolved your previous review comments by disallowing EII on static muts and by disallowing multiple eii impls on 1 static, and Jana reviewed this.
I have however not implemented this suggestion, because the implementation is significantly more complex especially around default impls, and I don't understand why the current implementation would be problematic. |
👍
That is fine to leave for later. For functions I believe the same is done as this PR does for statics. If statics without defaults get changed in the way I suggested, functions without defaults should be changed too. |
|
Then |
|
📋 This PR cannot be approved because it currently has the following label: |
|
@bors r=jdonszelmann |
…=jdonszelmann Implement EII for statics This PR implements EII for statics. I've tried to mirror the implementation for functions in a few places, this causes some duplicate code but I'm also not really sure whether there's a clean way to merge the implementations. This does not implement defaults for static EIIs yet, I will do that in a followup PR
…=jdonszelmann Implement EII for statics This PR implements EII for statics. I've tried to mirror the implementation for functions in a few places, this causes some duplicate code but I'm also not really sure whether there's a clean way to merge the implementations. This does not implement defaults for static EIIs yet, I will do that in a followup PR
…=jdonszelmann Implement EII for statics This PR implements EII for statics. I've tried to mirror the implementation for functions in a few places, this causes some duplicate code but I'm also not really sure whether there's a clean way to merge the implementations. This does not implement defaults for static EIIs yet, I will do that in a followup PR
…=jdonszelmann Implement EII for statics This PR implements EII for statics. I've tried to mirror the implementation for functions in a few places, this causes some duplicate code but I'm also not really sure whether there's a clean way to merge the implementations. This does not implement defaults for static EIIs yet, I will do that in a followup PR
…uwer Rollup of 6 pull requests Successful merges: - #155162 (relnotes for 1.95) - #154049 (delegation: Track more precise spans for glob delegations) - #154193 (Implement EII for statics) - #154435 (resolve: Some import resolution cleanups) - #154624 (Make `DerefPure` dyn-incompatible) - #155174 (Improve emission of `UnknownDiagnosticAttribute` lint)
…=jdonszelmann Implement EII for statics This PR implements EII for statics. I've tried to mirror the implementation for functions in a few places, this causes some duplicate code but I'm also not really sure whether there's a clean way to merge the implementations. This does not implement defaults for static EIIs yet, I will do that in a followup PR
…uwer Rollup of 13 pull requests Successful merges: - #155162 (relnotes for 1.95) - #140763 (Change codegen of LLVM intrinsics to be name-based, and add llvm linkage support for `bf16(xN)` and `i1xN`) - #154049 (delegation: Track more precise spans for glob delegations) - #154193 (Implement EII for statics) - #154435 (resolve: Some import resolution cleanups) - #153941 (tests/debuginfo/basic-stepping.rs: Explain why all lines are not steppable) - #154587 (Add --verbose-run-make-subprocess-output flag to suppress verbose run-make output for passing tests) - #154624 (Make `DerefPure` dyn-incompatible) - #154929 (Add `const Default` impls for `LazyCell` and `LazyLock`) - #154944 (Small refactor of `arena_cache` query values) - #155131 (Stabilize feature `uint_bit_width`) - #155147 (Stabilize feature `int_lowest_highest_one`) - #155174 (Improve emission of `UnknownDiagnosticAttribute` lint)
…=jdonszelmann Implement EII for statics This PR implements EII for statics. I've tried to mirror the implementation for functions in a few places, this causes some duplicate code but I'm also not really sure whether there's a clean way to merge the implementations. This does not implement defaults for static EIIs yet, I will do that in a followup PR
…uwer Rollup of 19 pull requests Successful merges: - #155162 (relnotes for 1.95) - #140763 (Change codegen of LLVM intrinsics to be name-based, and add llvm linkage support for `bf16(xN)` and `i1xN`) - #153604 (Fix thread::available_parallelism on WASI targets with threads) - #154193 (Implement EII for statics) - #154389 (Add more robust handling of nested query cycles) - #154435 (resolve: Some import resolution cleanups) - #155236 (Normalize individual predicate of `InstantiatedPredicates` inside `predicates_for_generics`) - #155243 (cg_ssa: transmute between scalable vectors) - #153941 (tests/debuginfo/basic-stepping.rs: Explain why all lines are not steppable) - #154587 (Add --verbose-run-make-subprocess-output flag to suppress verbose run-make output for passing tests) - #154624 (Make `DerefPure` dyn-incompatible) - #154929 (Add `const Default` impls for `LazyCell` and `LazyLock`) - #154944 (Small refactor of `arena_cache` query values) - #155055 (UI automation) - #155062 (Move tests from `tests/ui/issues/` to appropriate directories) - #155131 (Stabilize feature `uint_bit_width`) - #155147 (Stabilize feature `int_lowest_highest_one`) - #155174 (Improve emission of `UnknownDiagnosticAttribute` lint) - #155194 (Fix manpage version replacement and use verbose version)
Rollup merge of #154193 - JonathanBrouwer:external-static, r=jdonszelmann Implement EII for statics This PR implements EII for statics. I've tried to mirror the implementation for functions in a few places, this causes some duplicate code but I'm also not really sure whether there's a clean way to merge the implementations. This does not implement defaults for static EIIs yet, I will do that in a followup PR
…uwer Rollup of 19 pull requests Successful merges: - rust-lang/rust#155162 (relnotes for 1.95) - rust-lang/rust#140763 (Change codegen of LLVM intrinsics to be name-based, and add llvm linkage support for `bf16(xN)` and `i1xN`) - rust-lang/rust#153604 (Fix thread::available_parallelism on WASI targets with threads) - rust-lang/rust#154193 (Implement EII for statics) - rust-lang/rust#154389 (Add more robust handling of nested query cycles) - rust-lang/rust#154435 (resolve: Some import resolution cleanups) - rust-lang/rust#155236 (Normalize individual predicate of `InstantiatedPredicates` inside `predicates_for_generics`) - rust-lang/rust#155243 (cg_ssa: transmute between scalable vectors) - rust-lang/rust#153941 (tests/debuginfo/basic-stepping.rs: Explain why all lines are not steppable) - rust-lang/rust#154587 (Add --verbose-run-make-subprocess-output flag to suppress verbose run-make output for passing tests) - rust-lang/rust#154624 (Make `DerefPure` dyn-incompatible) - rust-lang/rust#154929 (Add `const Default` impls for `LazyCell` and `LazyLock`) - rust-lang/rust#154944 (Small refactor of `arena_cache` query values) - rust-lang/rust#155055 (UI automation) - rust-lang/rust#155062 (Move tests from `tests/ui/issues/` to appropriate directories) - rust-lang/rust#155131 (Stabilize feature `uint_bit_width`) - rust-lang/rust#155147 (Stabilize feature `int_lowest_highest_one`) - rust-lang/rust#155174 (Improve emission of `UnknownDiagnosticAttribute` lint) - rust-lang/rust#155194 (Fix manpage version replacement and use verbose version)
…uwer Rollup of 19 pull requests Successful merges: - rust-lang/rust#155162 (relnotes for 1.95) - rust-lang/rust#140763 (Change codegen of LLVM intrinsics to be name-based, and add llvm linkage support for `bf16(xN)` and `i1xN`) - rust-lang/rust#153604 (Fix thread::available_parallelism on WASI targets with threads) - rust-lang/rust#154193 (Implement EII for statics) - rust-lang/rust#154389 (Add more robust handling of nested query cycles) - rust-lang/rust#154435 (resolve: Some import resolution cleanups) - rust-lang/rust#155236 (Normalize individual predicate of `InstantiatedPredicates` inside `predicates_for_generics`) - rust-lang/rust#155243 (cg_ssa: transmute between scalable vectors) - rust-lang/rust#153941 (tests/debuginfo/basic-stepping.rs: Explain why all lines are not steppable) - rust-lang/rust#154587 (Add --verbose-run-make-subprocess-output flag to suppress verbose run-make output for passing tests) - rust-lang/rust#154624 (Make `DerefPure` dyn-incompatible) - rust-lang/rust#154929 (Add `const Default` impls for `LazyCell` and `LazyLock`) - rust-lang/rust#154944 (Small refactor of `arena_cache` query values) - rust-lang/rust#155055 (UI automation) - rust-lang/rust#155062 (Move tests from `tests/ui/issues/` to appropriate directories) - rust-lang/rust#155131 (Stabilize feature `uint_bit_width`) - rust-lang/rust#155147 (Stabilize feature `int_lowest_highest_one`) - rust-lang/rust#155174 (Improve emission of `UnknownDiagnosticAttribute` lint) - rust-lang/rust#155194 (Fix manpage version replacement and use verbose version)
View all comments
This PR implements EII for statics. I've tried to mirror the implementation for functions in a few places, this causes some duplicate code but I'm also not really sure whether there's a clean way to merge the implementations.
This does not implement defaults for static EIIs yet, I will do that in a followup PR