Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
34b5118
Suggest using std::mem::drop function instead of explicit destructor …
stanislav-tkach May 20, 2020
a9199de
Merge spans for the suggestion
stanislav-tkach May 22, 2020
68bab3e
Add total_cmp to f32 and f64, plus tests
golddranks May 22, 2020
b6eec22
Fix typo in src/libcore/num/f32.rs
golddranks May 25, 2020
d6650e0
Fix typo in src/libcore/num/f32.rs
golddranks May 25, 2020
bd68de8
remove unneeded and unidiomatic must_use
golddranks May 25, 2020
6973fd7
Add bit twiddling
golddranks May 25, 2020
8bc31ff
Fix the same typos again orz
golddranks May 25, 2020
c3dc8c4
Rename upvar_list to closure_captures
May 25, 2020
66da735
Add tracing issue for total_cmp
golddranks May 26, 2020
ca722b9
Add test for #56445
JohnTitor May 25, 2020
125f0ab
Add test for #68532
JohnTitor May 25, 2020
4b87f97
Add test for #70121
JohnTitor May 25, 2020
6315d0c
Add test for #71042
JohnTitor May 26, 2020
6ddbef1
Simplify suggestion
stanislav-tkach May 26, 2020
822ad87
Add Peekable::next_if
jyn514 May 18, 2020
42a4f5a
Fix grammar in liballoc raw_vec
pickfire May 28, 2020
813ce7a
`SocketAddr(V4|V6)?`::Display now correctly pads its content
Lucretiel May 20, 2020
defbd84
Added fast-path, tests
Lucretiel May 20, 2020
06a97a0
Clarify comment message & MAX_LENGTH const
Lucretiel May 22, 2020
12c03db
Add missing empty line in E0619 explanation
GuillaumeGomez May 29, 2020
3f13d97
liveness: Log information about used variables
tmiasko May 20, 2020
b3342b4
liveness: Remove unused clean_exit_var
tmiasko May 21, 2020
7c63014
liveness: Remove unused fallthrough_ln
tmiasko May 21, 2020
74fcbfb
liveness: Include upvars in the analysis
tmiasko May 21, 2020
4dc5661
liveness: Warn about unused captured variables
tmiasko May 22, 2020
cbcc4c4
Rollup merge of #72310 - jyn514:peekable-next-if, r=dtolnay
Dylan-DPC May 29, 2020
9c1f203
Rollup merge of #72383 - DarkEld3r:issue-72322, r=matthewjasper
Dylan-DPC May 29, 2020
8bce240
Rollup merge of #72398 - Lucretiel:ip-socket-display, r=Mark-Simulacrum
Dylan-DPC May 29, 2020
9ef6227
Rollup merge of #72465 - tmiasko:liveness-upvars, r=nikomatsakis
Dylan-DPC May 29, 2020
c09f0eb
Rollup merge of #72568 - golddranks:add_total_cmp_to_floats, r=sfackler
Dylan-DPC May 29, 2020
89cb4d7
Rollup merge of #72572 - JohnTitor:add-tests, r=matthewjasper
Dylan-DPC May 29, 2020
ed80e8e
Rollup merge of #72591 - sexxi-goose:rename_upvar_list-to-closure_cap…
Dylan-DPC May 29, 2020
510793b
Rollup merge of #72701 - pickfire:patch-1, r=Mark-Simulacrum
Dylan-DPC May 29, 2020
180a92c
Rollup merge of #72731 - GuillaumeGomez:cleanup-e0619, r=Dylan-DPC
Dylan-DPC May 29, 2020
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
Prev Previous commit
Next Next commit
liveness: Remove unused clean_exit_var
  • Loading branch information
tmiasko committed May 29, 2020
commit b3342b4920f2c89e0e41a8c365f576c1d9cdc004
15 changes: 1 addition & 14 deletions src/librustc_passes/liveness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,6 @@
//! the function, whether it be by explicit return, panic, or other means.
//!
//! - `fallthrough_ln`: a live node that represents a fallthrough
//!
//! - `clean_exit_var`: a synthetic variable that is only 'read' from the
//! fallthrough node. It is only live if the function could converge
//! via means other than an explicit `return` expression. That is, it is
//! only dead if the end of the function's block can never be reached.
//! It is the responsibility of typeck to ensure that there are no
//! `return` expressions in a function declared as diverging.

use self::LiveNodeKind::*;
use self::VarKind::*;
Expand Down Expand Up @@ -253,7 +246,6 @@ struct LocalInfo {
enum VarKind {
Param(HirId, Symbol),
Local(LocalInfo),
CleanExit,
}

struct IrMaps<'tcx> {
Expand Down Expand Up @@ -309,7 +301,6 @@ impl IrMaps<'tcx> {
Local(LocalInfo { id: node_id, .. }) | Param(node_id, _) => {
self.variable_map.insert(node_id, v);
}
CleanExit => {}
}

debug!("{:?} is {:?}", v, vk);
Expand All @@ -329,14 +320,13 @@ impl IrMaps<'tcx> {
fn variable_name(&self, var: Variable) -> String {
match self.var_kinds[var.get()] {
Local(LocalInfo { name, .. }) | Param(_, name) => name.to_string(),
CleanExit => "<clean-exit>".to_owned(),
}
}

fn variable_is_shorthand(&self, var: Variable) -> bool {
match self.var_kinds[var.get()] {
Local(LocalInfo { is_shorthand, .. }) => is_shorthand,
Param(..) | CleanExit => false,
Param(..) => false,
}
}

Expand Down Expand Up @@ -649,7 +639,6 @@ impl RWUTable {
struct Specials {
exit_ln: LiveNode,
fallthrough_ln: LiveNode,
clean_exit_var: Variable,
}

const ACC_READ: u32 = 1;
Expand Down Expand Up @@ -680,7 +669,6 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
let specials = Specials {
exit_ln: ir.add_live_node(ExitNode),
fallthrough_ln: ir.add_live_node(ExitNode),
clean_exit_var: ir.add_variable(CleanExit),
};

let tables = ir.tcx.typeck_tables_of(def_id);
Expand Down Expand Up @@ -913,7 +901,6 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
// explicitly return:
let s = self.s;
self.init_from_succ(s.fallthrough_ln, s.exit_ln);
self.acc(s.fallthrough_ln, s.clean_exit_var, ACC_READ);

let entry_ln = self.propagate_through_expr(body, s.fallthrough_ln);

Expand Down