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>
This commit is contained in:
parent
a8e37507f4
commit
26255186e2
23 changed files with 86 additions and 48 deletions
|
@ -30,10 +30,11 @@ pub fn main() {
|
|||
assert_eq!(gravy::foo(), 10);
|
||||
}
|
||||
|
||||
static TEST_LOCALE_RESOURCES: &[&str] = &[rustc_parse::DEFAULT_LOCALE_RESOURCE];
|
||||
|
||||
fn parse() {
|
||||
let parse_session = ParseSess::new(TEST_LOCALE_RESOURCES, FilePathMapping::empty());
|
||||
let parse_session = ParseSess::new(
|
||||
vec![rustc_parse::DEFAULT_LOCALE_RESOURCE],
|
||||
FilePathMapping::empty()
|
||||
);
|
||||
|
||||
let path = Path::new(file!());
|
||||
let path = path.canonicalize().unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue