diff options
| author | ljedrz <ljedrz@gmail.com> | 2018-07-10 21:06:26 +0200 |
|---|---|---|
| committer | ljedrz <ljedrz@gmail.com> | 2018-07-10 21:06:26 +0200 |
| commit | e28e4877a828d1f5bda49dbb5bae1b902596f8f6 (patch) | |
| tree | a0b6146b70b44b7b46d563c3fc1634e84642f78b /src/libsyntax/diagnostics | |
| parent | 77117e383676176116851d7d3ec04b5e0cf0c456 (diff) | |
| download | rust-e28e4877a828d1f5bda49dbb5bae1b902596f8f6.tar.gz rust-e28e4877a828d1f5bda49dbb5bae1b902596f8f6.zip | |
Deny bare trait objects in in src/libsyntax
Diffstat (limited to 'src/libsyntax/diagnostics')
| -rw-r--r-- | src/libsyntax/diagnostics/metadata.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/diagnostics/plugin.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/diagnostics/metadata.rs b/src/libsyntax/diagnostics/metadata.rs index dc01a79190b..61b0579a3e7 100644 --- a/src/libsyntax/diagnostics/metadata.rs +++ b/src/libsyntax/diagnostics/metadata.rs @@ -73,7 +73,7 @@ fn get_metadata_path(directory: PathBuf, name: &str) -> PathBuf { /// For our current purposes the prefix is the target architecture and the name is a crate name. /// If an error occurs steps will be taken to ensure that no file is created. pub fn output_metadata(ecx: &ExtCtxt, prefix: &str, name: &str, err_map: &ErrorMap) - -> Result<(), Box<Error>> + -> Result<(), Box<dyn Error>> { // Create the directory to place the file in. let metadata_dir = get_metadata_dir(prefix); diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs index ca0293aca6e..72ce2740190 100644 --- a/src/libsyntax/diagnostics/plugin.rs +++ b/src/libsyntax/diagnostics/plugin.rs @@ -42,7 +42,7 @@ pub type ErrorMap = BTreeMap<Name, ErrorInfo>; pub fn expand_diagnostic_used<'cx>(ecx: &'cx mut ExtCtxt, span: Span, token_tree: &[TokenTree]) - -> Box<MacResult+'cx> { + -> Box<dyn MacResult+'cx> { let code = match (token_tree.len(), token_tree.get(0)) { (1, Some(&TokenTree::Token(_, token::Ident(code, _)))) => code, _ => unreachable!() @@ -75,7 +75,7 @@ pub fn expand_diagnostic_used<'cx>(ecx: &'cx mut ExtCtxt, pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt, span: Span, token_tree: &[TokenTree]) - -> Box<MacResult+'cx> { + -> Box<dyn MacResult+'cx> { let (code, description) = match ( token_tree.len(), token_tree.get(0), @@ -145,7 +145,7 @@ pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt, pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt, span: Span, token_tree: &[TokenTree]) - -> Box<MacResult+'cx> { + -> Box<dyn MacResult+'cx> { assert_eq!(token_tree.len(), 3); let (crate_name, name) = match (&token_tree[0], &token_tree[2]) { ( |
