about summary refs log tree commit diff
path: root/src/librustdoc/clean/render_macro_matchers.rs
diff options
context:
space:
mode:
authorDavid Wood <david.wood@huawei.com>2022-10-17 14:11:26 +0100
committerDavid Wood <david.wood@huawei.com>2023-02-22 09:15:54 +0000
commit26255186e2e94e0fe62cfd0965662494b6aab27c (patch)
tree0f067abfaeeada0568afcf197354b77720efd87c /src/librustdoc/clean/render_macro_matchers.rs
parenta8e37507f4815c789a6fcb204f209806a4c3952d (diff)
downloadrust-26255186e2e94e0fe62cfd0965662494b6aab27c.tar.gz
rust-26255186e2e94e0fe62cfd0965662494b6aab27c.zip
various: translation resources from cg backend
Extend `CodegenBackend` trait with a function returning the translation
resources from the codegen backend, which can be added to the complete
list of resources provided to the emitter.

Signed-off-by: David Wood <david.wood@huawei.com>
Diffstat (limited to 'src/librustdoc/clean/render_macro_matchers.rs')
-rw-r--r--src/librustdoc/clean/render_macro_matchers.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/clean/render_macro_matchers.rs b/src/librustdoc/clean/render_macro_matchers.rs
index 068d596f52f..ef38ca3c16c 100644
--- a/src/librustdoc/clean/render_macro_matchers.rs
+++ b/src/librustdoc/clean/render_macro_matchers.rs
@@ -63,7 +63,8 @@ fn snippet_equal_to_token(tcx: TyCtxt<'_>, matcher: &TokenTree) -> Option<String
     let snippet = source_map.span_to_snippet(span).ok()?;
 
     // Create a Parser.
-    let sess = ParseSess::new(rustc_driver::DEFAULT_LOCALE_RESOURCES, FilePathMapping::empty());
+    let sess =
+        ParseSess::new(rustc_driver::DEFAULT_LOCALE_RESOURCES.to_vec(), FilePathMapping::empty());
     let file_name = source_map.span_to_filename(span);
     let mut parser =
         match rustc_parse::maybe_new_parser_from_source_str(&sess, file_name, snippet.clone()) {