Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 13 pull requests #40440

Closed
wants to merge 34 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
53d3c89
Dont bug! on user error
bjorn3 Feb 28, 2017
54a1c8b
Fix indentation in region infer docs
bjorn3 Feb 28, 2017
2a40918
Syntax highlighting in region infer docs
bjorn3 Feb 28, 2017
be49671
Improve a bit more
bjorn3 Feb 28, 2017
90e94d9
Syntax highlight and note about current rust in infer docs
bjorn3 Feb 28, 2017
234753a
Fix missing backtick typo
Nashenas88 Mar 8, 2017
3198904
Disallow subtyping between T and U in T: Unsize<U>.
eddyb Mar 7, 2017
79a7ee8
fix UB in repr(packed) tests
TimNN Mar 8, 2017
74bc7fd
Overhaul coercion to use the lazy InferOk obligations passing.
eddyb Mar 8, 2017
84d1f6a
Do not bother creating StorageLive for TyNever
nagisa Mar 8, 2017
cfb41ae
Use subtyping on the target of unsizing coercions.
eddyb Mar 9, 2017
b95b5db
update gdbr tests
TimNN Mar 9, 2017
7f19f1f
fix #40294 obligation cause.body_id is not always a NodeExpr
Mar 9, 2017
889337d
move related tests to type-check ui test directory
Mar 10, 2017
a5a3981
Add missing example for Display::fmt
GuillaumeGomez Mar 6, 2017
e5d1b9c
save-analysis: cope with lack of method data after a type error
nrc Mar 8, 2017
c9b6318
rustc_trans: don't emit ZST allocas that are only assigned to.
eddyb Mar 8, 2017
d8ca084
rustc_trans: avoid a separate entry BB if START_BLOCK has no backedges.
eddyb Mar 8, 2017
b959d13
Allow lints to check Bodys directly
oli-obk Mar 7, 2017
038ec50
emit !align attributes on stores of operand pairs
arielb1 Mar 9, 2017
4d23ca4
rustc: Whitelist the FMA target feature
fsasm Mar 10, 2017
6de0edc
Rollup merge of #40146 - bjorn3:few-infer-changes, r=pnkfelix
Mar 11, 2017
021e11d
Rollup merge of #40299 - GuillaumeGomez:fmt-display-example, r=frewsxcv
Mar 11, 2017
fabc4d1
Rollup merge of #40315 - oli-obk:lint_body, r=eddyb
Mar 11, 2017
6029d38
Rollup merge of #40319 - eddyb:it's-"unsize"-not-"unsound", r=nikomat…
Mar 11, 2017
1527d8e
Rollup merge of #40344 - nrc:save-container, r=eddyb
Mar 11, 2017
d060e43
Rollup merge of #40345 - Nashenas88:patch-1, r=estebank
Mar 11, 2017
6214e1a
Rollup merge of #40367 - eddyb:naked-cruft, r=nagisa
Mar 11, 2017
828625c
Rollup merge of #40372 - nagisa:never-drop, r=eddyb
Mar 11, 2017
7dd28e2
Rollup merge of #40373 - TimNN:test-ub-packed, r=arielb1
Mar 11, 2017
d0531e9
Rollup merge of #40385 - arielb1:packed-again, r=eddyb
Mar 11, 2017
7205a43
Rollup merge of #40400 - TimNN:gdbr-updates, r=alexcrichton
Mar 11, 2017
1822a45
Rollup merge of #40404 - cengizIO:master, r=nikomatsakis
Mar 11, 2017
effb66c
Rollup merge of #40431 - fsasm:master, r=BurntSushi
Mar 11, 2017
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
6 changes: 6 additions & 0 deletions src/librustc/lint/context.rs
Original file line number Diff line number Diff line change
@@ -806,6 +806,12 @@ impl<'a, 'tcx> hir_visit::Visitor<'tcx> for LateContext<'a, 'tcx> {
self.tables = old_tables;
}

fn visit_body(&mut self, body: &'tcx hir::Body) {
run_lints!(self, check_body, late_passes, body);
hir_visit::walk_body(self, body);
run_lints!(self, check_body_post, late_passes, body);
}

fn visit_item(&mut self, it: &'tcx hir::Item) {
self.with_lint_attrs(&it.attrs, |cx| {
run_lints!(cx, check_item, late_passes, it);
2 changes: 2 additions & 0 deletions src/librustc/lint/mod.rs
Original file line number Diff line number Diff line change
@@ -133,6 +133,8 @@ pub trait LintPass {
// FIXME: eliminate the duplication with `Visitor`. But this also
// contains a few lint-specific methods with no equivalent in `Visitor`.
pub trait LateLintPass<'a, 'tcx>: LintPass {
fn check_body(&mut self, _: &LateContext, _: &'tcx hir::Body) { }
fn check_body_post(&mut self, _: &LateContext, _: &'tcx hir::Body) { }
fn check_name(&mut self, _: &LateContext, _: Span, _: ast::Name) { }
fn check_crate(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx hir::Crate) { }
fn check_crate_post(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx hir::Crate) { }