1
Fork 0
rust/compiler
Matthias Krüger 3201fe9893
Rollup merge of #134524 - adetaylor:getref, r=compiler-errors
Arbitrary self types v2: no deshadow pre feature.

The arbitrary self types v2 work introduces a check for shadowed methods, whereby a method in some "outer" smart pointer type may called in preference to a method in the inner referent. This is bad if the outer pointer adds a method later, as it may change behavior, so we ensure we error in this circumstance.

It was intended that this new shadowing detection system only comes into play for users who enable the `arbitrary_self_types` feature (or of course everyone later if it's stabilized). It was believed that the new deshadowing code couldn't be reached without building the custom smart pointers that `arbitrary_self_types` enables, and therefore there was no risk of this code impacting existing users.

However, it turns out that cunning use of `Pin::get_ref` can cause this type of shadowing error to be emitted now. This commit adds a test for this case.

As we want this test to pass without arbitrary_self_types, but fail with it, I've split it into two files (one with run-pass and one without). If there's a better way I can amend it.

Part of #44874

r? ```@wesleywiser```
2024-12-21 01:30:16 +01:00
..
rustc switch jemalloc-sys back to tikv-jemalloc-sys, and update to 0.6.0 2024-12-03 08:56:33 +00:00
rustc_abi make no-variant types a dedicated Variants variant 2024-12-18 11:01:54 +01:00
rustc_arena
rustc_ast Rollup merge of #133782 - dtolnay:closuresjumps, r=spastorino,traviscross 2024-12-21 01:30:15 +01:00
rustc_ast_ir
rustc_ast_lowering Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
rustc_ast_passes Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
rustc_ast_pretty Rollup merge of #134161 - nnethercote:overhaul-token-cursors, r=spastorino 2024-12-18 22:56:53 +08:00
rustc_attr_data_structures rename rustc_attr to rustc_attr_parsing and create rustc_attr_data_structures 2024-12-16 19:08:19 +01:00
rustc_attr_parsing Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
rustc_baked_icu_data Delete the cfg(not(parallel)) serial compiler 2024-11-12 13:38:58 +00:00
rustc_borrowck Rollup merge of #134574 - lcnr:opaque-ty-hack-yeet, r=compiler-errors 2024-12-20 21:32:33 +01:00
rustc_builtin_macros Speed up Parser::expected_token_types. 2024-12-19 16:05:41 +11:00
rustc_codegen_cranelift Make DependencyList an IndexVec 2024-12-19 15:30:32 +00:00
rustc_codegen_gcc chore: fix some typos 2024-12-18 23:23:44 +08:00
rustc_codegen_llvm Remove some dead code around import library generation 2024-12-20 15:20:15 +00:00
rustc_codegen_ssa Rollup merge of #134561 - bjorn3:less_fatal_error_raise, r=compiler-errors 2024-12-20 21:32:30 +01:00
rustc_const_eval Auto merge of #134550 - jhpratt:rollup-wsfmo59, r=jhpratt 2024-12-20 07:27:15 +00:00
rustc_data_structures Remove jobserver from Session 2024-12-13 10:21:22 +00:00
rustc_driver
rustc_driver_impl Reduce the amount of explicit FatalError.raise() 2024-12-20 14:09:25 +00:00
rustc_error_codes Auto merge of #132706 - compiler-errors:async-closures, r=oli-obk 2024-12-13 00:37:51 +00:00
rustc_error_messages Delete the cfg(not(parallel)) serial compiler 2024-11-12 13:38:58 +00:00
rustc_errors Rollup merge of #134366 - harrisonkaiser:no-break-space, r=davidtwco 2024-12-20 21:46:59 +08:00
rustc_expand Speed up Parser::expected_token_types. 2024-12-19 16:05:41 +11:00
rustc_feature split up #[rustc_deny_explicit_impl] attribute 2024-12-20 16:57:14 +01:00
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir Rollup merge of #133782 - dtolnay:closuresjumps, r=spastorino,traviscross 2024-12-21 01:30:15 +01:00
rustc_hir_analysis split up #[rustc_deny_explicit_impl] attribute 2024-12-20 16:57:14 +01:00
rustc_hir_pretty Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
rustc_hir_typeck Rollup merge of #134524 - adetaylor:getref, r=compiler-errors 2024-12-21 01:30:16 +01:00
rustc_incremental Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
rustc_index add MixedBitSet::clear 2024-12-17 18:54:39 +00:00
rustc_index_macros Auto merge of #130867 - michirakara:steps_between, r=dtolnay 2024-11-22 10:54:22 +00:00
rustc_infer Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
rustc_interface Rollup merge of #134514 - bjorn3:more_driver_refactors, r=jieyouxu 2024-12-20 21:47:00 +08:00
rustc_lexer Add test to check unicode identifier version 2024-12-09 06:23:59 -08:00
rustc_lint Auto merge of #133961 - lcnr:borrowck-cleanup, r=jackh726 2024-12-19 08:33:20 +00:00
rustc_lint_defs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
rustc_llvm Remove some dead code around import library generation 2024-12-20 15:20:15 +00:00
rustc_log
rustc_macros Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
rustc_metadata Review comments 2024-12-20 08:35:02 +00:00
rustc_middle Rollup merge of #134573 - lukas-code:unimpl-dyn-pointerlike, r=compiler-errors 2024-12-20 21:32:33 +01:00
rustc_mir_build Auto merge of #134486 - compiler-errors:drop-for-lint, r=nikomatsakis 2024-12-19 15:58:08 +00:00
rustc_mir_dataflow Auto merge of #133328 - nnethercote:simplify-SwitchInt-handling, r=tmiasko 2024-12-18 22:57:23 +00:00
rustc_mir_transform coverage: Rename basic_coverage_blocks to just graph 2024-12-20 17:48:59 +11:00
rustc_monomorphize Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
rustc_next_trait_solver update new solver candidate assembly 2024-12-18 16:35:05 +01:00
rustc_parse Reduce the amount of explicit FatalError.raise() 2024-12-20 14:09:25 +00:00
rustc_parse_format
rustc_passes split up #[rustc_deny_explicit_impl] attribute 2024-12-20 16:57:14 +01:00
rustc_pattern_analysis no more Reveal :( 2024-11-23 13:52:54 +01:00
rustc_privacy Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
rustc_query_impl Rename ty_def_id so people will stop using it by accident 2024-12-13 16:36:38 +00:00
rustc_query_system Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
rustc_resolve Rollup merge of #134473 - acceptacross:master, r=compiler-errors 2024-12-18 21:38:10 -05:00
rustc_sanitizers Remove more traces of anonymous ADTs 2024-12-10 19:50:47 +00:00
rustc_serialize
rustc_session Rollup merge of #134561 - bjorn3:less_fatal_error_raise, r=compiler-errors 2024-12-20 21:32:30 +01:00
rustc_smir make no-variant types a dedicated Variants variant 2024-12-18 11:01:54 +01:00
rustc_span split up #[rustc_deny_explicit_impl] attribute 2024-12-20 16:57:14 +01:00
rustc_symbol_mangling Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
rustc_target make no-variant types a dedicated Variants variant 2024-12-18 11:01:54 +01:00
rustc_trait_selection Reduce the amount of explicit FatalError.raise() 2024-12-20 14:09:25 +00:00
rustc_traits Delay a bug when encountering an impl with unconstrained generics in codegen_select 2024-11-23 05:27:45 +00:00
rustc_transmute add comment explaining why ty_and_layout_field is not used 2024-12-18 11:01:54 +01:00
rustc_ty_utils make no-variant types a dedicated Variants variant 2024-12-18 11:01:54 +01:00
rustc_type_ir Rollup merge of #133643 - lcnr:merge-candidates, r=compiler-errors 2024-12-18 21:38:08 -05:00
rustc_type_ir_macros
stable_mir make no-variant types a dedicated Variants variant 2024-12-18 11:01:54 +01:00