Skip to content

Commit

Permalink
submodules: update clippy from 2f6881c to 754b4c0
Browse files Browse the repository at this point in the history
Changes:
````
rustup rust-lang/rust#54071
dependencies: update pulldown-cmark from 0.1 to 0.2
s/file_map/source_map
````
  • Loading branch information
matthiaskrgr committed Nov 23, 2018
1 parent f72ea3f commit 5afee64
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ serde = "1.0"
serde_derive = "1.0"
toml = "0.4"
unicode-normalization = "0.1"
pulldown-cmark = "0.1"
pulldown-cmark = "0.2"
url = "1.7.0"
if_chain = "0.1.3"
smallvec = { version = "0.6.5", features = ["union"] }
Expand Down
4 changes: 2 additions & 2 deletions clippy_lints/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1064,8 +1064,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CastPass {
if_chain!{
if let ty::RawPtr(from_ptr_ty) = &cast_from.sty;
if let ty::RawPtr(to_ptr_ty) = &cast_to.sty;
if let Some(from_align) = cx.layout_of(from_ptr_ty.ty).ok().map(|a| a.align.abi());
if let Some(to_align) = cx.layout_of(to_ptr_ty.ty).ok().map(|a| a.align.abi());
if let Some(from_align) = cx.layout_of(from_ptr_ty.ty).ok().map(|a| a.align.abi);
if let Some(to_align) = cx.layout_of(to_ptr_ty.ty).ok().map(|a| a.align.abi);
if from_align < to_align;
// with c_void, we inherently need to trust the user
if ! (
Expand Down
6 changes: 3 additions & 3 deletions clippy_lints/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,9 @@ pub fn snippet_block<'a, 'b, T: LintContext<'b>>(cx: &T, span: Span, default: &'

/// Returns a new Span that covers the full last line of the given Span
pub fn last_line_of_span<'a, T: LintContext<'a>>(cx: &T, span: Span) -> Span {
let file_map_and_line = cx.sess().source_map().lookup_line(span.lo()).unwrap();
let line_no = file_map_and_line.line;
let line_start = &file_map_and_line.sf.lines[line_no];
let source_map_and_line = cx.sess().source_map().lookup_line(span.lo()).unwrap();
let line_no = source_map_and_line.line;
let line_start = &source_map_and_line.sf.lines[line_no];
Span::new(*line_start, span.hi(), span.ctxt())
}

Expand Down

0 comments on commit 5afee64

Please sign in to comment.