diff options
| author | Andre Bogus <bogusandre@gmail.com> | 2017-05-12 20:05:39 +0200 |
|---|---|---|
| committer | Andre Bogus <bogusandre@gmail.com> | 2017-05-12 20:05:39 +0200 |
| commit | a9c163ebe9deeaf74699fc8642d919cdb2b5e617 (patch) | |
| tree | a964a99f5353d47f5468e7c9b55ba658c549bd79 /src/libsyntax/diagnostics/plugin.rs | |
| parent | e19ccb71c8427135a69d874623af68422aeeb9e9 (diff) | |
| download | rust-a9c163ebe9deeaf74699fc8642d919cdb2b5e617.tar.gz rust-a9c163ebe9deeaf74699fc8642d919cdb2b5e617.zip | |
Fix some clippy warnings in libsyntax
This is mostly removing stray ampersands, needless returns and lifetimes.
Diffstat (limited to 'src/libsyntax/diagnostics/plugin.rs')
| -rw-r--r-- | src/libsyntax/diagnostics/plugin.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs index fe5cb87ad59..ca89a80fdee 100644 --- a/src/libsyntax/diagnostics/plugin.rs +++ b/src/libsyntax/diagnostics/plugin.rs @@ -111,7 +111,7 @@ pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt, // overflow the maximum line width. description.map(|raw_msg| { let msg = raw_msg.as_str(); - if !msg.starts_with("\n") || !msg.ends_with("\n") { + if !msg.starts_with('\n') || !msg.ends_with('\n') { ecx.span_err(span, &format!( "description for error code {} doesn't start and end with a newline", code @@ -177,7 +177,7 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt, if let Err(e) = output_metadata(ecx, &target_triple, &crate_name.name.as_str(), - &diagnostics) { + diagnostics) { ecx.span_bug(span, &format!( "error writing metadata for triple `{}` and crate `{}`, error: {}, \ cause: {:?}", @@ -227,7 +227,7 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt, MacEager::items(SmallVector::many(vec