Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
5ce4d0d
Refresh of #94678
Mallets Mar 20, 2025
03aef02
Use IPv6 addresses in hop_limit_v6 docs
Mallets Mar 20, 2025
8962536
Add ui test cast-array-issue-138836
xizheyin Mar 26, 2025
a34c42f
Expect an array when expected and acutal types are both arrays during…
xizheyin Mar 26, 2025
5ace46a
Update tracking issue to 139166
Mallets Mar 31, 2025
8866af3
Add `naked_functions_rustic_abi` feature gate
folkertdev Mar 26, 2025
f20efc4
Handle `UnsafePointer` coercions in one place
oli-obk Apr 9, 2025
697768a
Simplify some `unify_and` calls
oli-obk Apr 9, 2025
804b6c9
Rename `unify` to `unify_raw`
oli-obk Apr 9, 2025
34258d6
Add a dedicated function for the common `unify_and(identity)` case
oli-obk Apr 9, 2025
3528a65
Deduplicate `target` type setting in `unify_and` callbacks
oli-obk Apr 9, 2025
673012f
Some performance shenanigans
oli-obk Apr 10, 2025
f80b121
Avoid some more duplication
oli-obk Apr 10, 2025
95ad6df
add `span_extend_to_prev_char_before()` to `SourceMap`
makai410 Apr 10, 2025
0069cad
Micro-optimize `InstSimplify`'s `simplify_primitive_clone`
yotamofek Apr 10, 2025
f97da85
suggest: remove redundant `$()?`around `vis` fragments
makai410 Apr 11, 2025
923f44c
consistent name for `UniversalRegions`
lcnr Apr 11, 2025
8cb7274
use input `def_id` to compute `movable_coroutine`
lcnr Apr 11, 2025
848187c
`local_names` creation to `mbcx` creation
lcnr Apr 11, 2025
0186459
do not buffer `#[rustc_regions]` dump
lcnr Apr 11, 2025
0e294f2
`MirBorrowckCtxt::polonius_output` to ref
lcnr Apr 11, 2025
2c65469
move `dump_polonius_mir`
lcnr Apr 11, 2025
c5fdddc
don't rely on `locals_are_invalidated_at_exit`
lcnr Apr 11, 2025
8303383
remove redundant fields
lcnr Apr 11, 2025
5d00483
`NonGenericOpaqueTypeParam::ty` to `arg`
lcnr Apr 11, 2025
420390c
eagerly initialize `definitions` in sub-fn
lcnr Apr 11, 2025
ac45a67
Use delayed bug for normalization errors in drop elaboration
matthewjasper Apr 4, 2025
c36e8fc
In `rustc_mir_tranform`, iterate over index newtypes instead of ints
yotamofek Apr 11, 2025
accae53
Move FlagComputation, PatternKind, and TypeWalker to rustc_type_ir
jackh726 Apr 8, 2025
16334cd
tests: convert `tests/ui/lint/dead-code/self-assign.rs` to known-bug
jieyouxu Apr 13, 2025
b203d40
compiletest: add `camino` for UTF-8 path handling
jieyouxu Apr 11, 2025
e24b0c8
compiletest: consistently use `{Utf8Path,Utf8PathBuf}`
jieyouxu Apr 11, 2025
957324b
rustdoc-gui-test: pass a `camino::Utf8PathBuf` to `compiletest`
jieyouxu Apr 12, 2025
25fb525
Update docs according to PR review
Mallets Mar 31, 2025
dca6dc5
Rollup merge of #138744 - Mallets:set_ipv6_sock_hop_limit, r=dtolnay
ChrisDenton Apr 13, 2025
8bed0ba
Rollup merge of #138962 - xizheyin:issue-138836, r=compiler-errors
ChrisDenton Apr 13, 2025
d5a95ed
Rollup merge of #139001 - folkertdev:naked-function-rustic-abi, r=tra…
ChrisDenton Apr 13, 2025
88e7f7d
Rollup merge of #139379 - matthewjasper:drop-elab-normalization, r=co…
ChrisDenton Apr 13, 2025
e0b91b2
Rollup merge of #139582 - oli-obk:coercion-cleanups, r=compiler-errors
ChrisDenton Apr 13, 2025
269d0ad
Rollup merge of #139628 - makai410:suggest-vis, r=compiler-errors
ChrisDenton Apr 13, 2025
40b2f75
Rollup merge of #139644 - yotamofek:pr/mir_transform/instsimplify/sim…
ChrisDenton Apr 13, 2025
e63d746
Rollup merge of #139666 - lcnr:pre-revealing-use-cleanup, r=compiler-…
ChrisDenton Apr 13, 2025
c2b8088
Rollup merge of #139674 - yotamofek:pr/mir_transform/index-iterators,…
ChrisDenton Apr 13, 2025
324d8d2
Rollup merge of #139695 - jieyouxu:compiletest-utf8path, r=Kobzol
ChrisDenton Apr 13, 2025
25b876b
Rollup merge of #139722 - jackh726:patternkind-walk-toir, r=compiler-…
ChrisDenton Apr 13, 2025
22b2f00
Rollup merge of #139740 - jieyouxu:known-bug, r=nnethercote
ChrisDenton Apr 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions tests/ui/lint/dead-code/self-assign.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
// Test that dead code warnings are issued for superfluous assignments of
// fields or variables to themselves (issue #75356).

//@ ignore-test FIXME(81658, 83171)
//! Test that dead code warnings are issued for superfluous assignments of fields or variables to
//! themselves (issue #75356).
//!
//! # History of this test (to aid relanding of a fixed version of #81473)
//!
//! - Original lint request was about self-assignments not triggering sth like `dead_code`.
//! - `dead_code` lint expansion for self-assignments was implemented in #87129.
//! - Unfortunately implementation components of #87129 had to be disabled as part of reverts
//! #86212, #83171 (to revert #81473) to address regressions #81626 and #81658.
//! - Consequently, none of the following warnings are emitted.

//@ check-pass

// Implementation of self-assignment `dead_code` lint expansions disabled due to reverts.
//@ known-bug: #75356

#![allow(unused_assignments)]
#![warn(dead_code)]

fn main() {
let mut x = 0;
x = x;
//~^ WARNING: useless assignment of variable of type `i32` to itself
// FIXME ~^ WARNING: useless assignment of variable of type `i32` to itself

x = (x);
//~^ WARNING: useless assignment of variable of type `i32` to itself
// FIXME ~^ WARNING: useless assignment of variable of type `i32` to itself

x = {x};
// block expressions don't count as self-assignments
Expand All @@ -22,10 +32,10 @@ fn main() {
struct S<'a> { f: &'a str }
let mut s = S { f: "abc" };
s = s;
//~^ WARNING: useless assignment of variable of type `S` to itself
// FIXME ~^ WARNING: useless assignment of variable of type `S` to itself

s.f = s.f;
//~^ WARNING: useless assignment of field of type `&str` to itself
// FIXME ~^ WARNING: useless assignment of field of type `&str` to itself


struct N0 { x: Box<i32> }
Expand All @@ -34,11 +44,11 @@ fn main() {
struct N3 { n: N2 };
let mut n3 = N3 { n: N2(N1 { n: N0 { x: Box::new(42) } }) };
n3.n.0.n.x = n3.n.0.n.x;
//~^ WARNING: useless assignment of field of type `Box<i32>` to itself
// FIXME ~^ WARNING: useless assignment of field of type `Box<i32>` to itself

let mut t = (1, ((2, 3, (4, 5)),));
t.1.0.2.1 = t.1.0.2.1;
//~^ WARNING: useless assignment of field of type `i32` to itself
// FIXME ~^ WARNING: useless assignment of field of type `i32` to itself


let mut y = 0;
Expand Down
44 changes: 0 additions & 44 deletions tests/ui/lint/dead-code/self-assign.stderr

This file was deleted.

Loading