Accept TyCtxt instead of TyCtxtAt in Ty::is_* functions#103625
Accept TyCtxt instead of TyCtxtAt in Ty::is_* functions#103625bors merged 3 commits intorust-lang:masterfrom
TyCtxt instead of TyCtxtAt in Ty::is_* functions#103625Conversation
Functions in answer: - `Ty::is_freeze` - `Ty::is_sized` - `Ty::is_unpin` - `Ty::is_copy_modulo_regions`
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
|
I was told that the span from |
If it is used anywhere and we test that code path, you'll see it in ui tests. We have a bunch of cycle error tests, and cycles is where this shows up for users. |
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
This comment has been minimized.
This comment has been minimized.
|
I'm not sure if this is worthwhile, and I think you'll see UI test changes when you bless the tests... 🤔 |
|
The Miri subtree was changed cc @rust-lang/miri |
|
🤔 how does this not affect any of the UI tests? |
|
Why would it? I don't think that these queries can lead to cycle errors, so the spans are never shown to the user, I think? |
|
Hm, maybe so. In that case, @bors r+ |
…llaumeGomez Rollup of 8 pull requests Successful merges: - rust-lang#102634 (compiletest: Refactor test rustcflags) - rust-lang#102721 (Prevent foreign Rust exceptions from being caught) - rust-lang#103415 (filter candidates in pick probe for diagnostics) - rust-lang#103618 (Rename some `OwnerId` fields.) - rust-lang#103625 (Accept `TyCtxt` instead of `TyCtxtAt` in `Ty::is_*` functions) - rust-lang#103653 (Add missing impl blocks for item reexported from private mod in JSON output) - rust-lang#103699 (Emit proper error when casting to `dyn*`) - rust-lang#103719 (fix typo in `try_reserve` method from `HashMap` and `HashSet`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…d, r=compiler-errors Accept `TyCtxt` instead of `TyCtxtAt` in `Ty::is_*` functions Functions in answer: - `Ty::is_freeze` - `Ty::is_sized` - `Ty::is_unpin` - `Ty::is_copy_modulo_regions` This allows to remove a lot of useless `.at(DUMMY_SP)`, making the code a bit nicer :3 r? `@compiler-errors`
…d, r=compiler-errors Accept `TyCtxt` instead of `TyCtxtAt` in `Ty::is_*` functions Functions in answer: - `Ty::is_freeze` - `Ty::is_sized` - `Ty::is_unpin` - `Ty::is_copy_modulo_regions` This allows to remove a lot of useless `.at(DUMMY_SP)`, making the code a bit nicer :3 r? `@compiler-errors`
…llaumeGomez Rollup of 8 pull requests Successful merges: - rust-lang#102634 (compiletest: Refactor test rustcflags) - rust-lang#102721 (Prevent foreign Rust exceptions from being caught) - rust-lang#103415 (filter candidates in pick probe for diagnostics) - rust-lang#103618 (Rename some `OwnerId` fields.) - rust-lang#103625 (Accept `TyCtxt` instead of `TyCtxtAt` in `Ty::is_*` functions) - rust-lang#103653 (Add missing impl blocks for item reexported from private mod in JSON output) - rust-lang#103699 (Emit proper error when casting to `dyn*`) - rust-lang#103719 (fix typo in `try_reserve` method from `HashMap` and `HashSet`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Functions in answer:
Ty::is_freezeTy::is_sizedTy::is_unpinTy::is_copy_modulo_regionsThis allows to remove a lot of useless
.at(DUMMY_SP), making the code a bit nicer :3r? @compiler-errors