aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rust-session-manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/rust-session-manager.cc')
-rw-r--r--gcc/rust/rust-session-manager.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc
index bdab0d8..8876459 100644
--- a/gcc/rust/rust-session-manager.cc
+++ b/gcc/rust/rust-session-manager.cc
@@ -870,7 +870,8 @@ Session::injection (AST::Crate &crate)
{
// create "macro use" attribute for use on extern crate item to enable
// loading macros from it
- AST::Attribute attr (AST::SimplePath::from_str ("macro_use"), nullptr);
+ AST::Attribute attr (AST::SimplePath::from_str ("macro_use", Location ()),
+ nullptr);
// create "extern crate" item with the name
std::unique_ptr<AST::ExternCrate> extern_crate (
@@ -885,13 +886,15 @@ Session::injection (AST::Crate &crate)
// create use tree path
// prelude is injected_crate_name
std::vector<AST::SimplePathSegment> segments
- = {AST::SimplePathSegment (injected_crate_name),
- AST::SimplePathSegment ("prelude"), AST::SimplePathSegment ("v1")};
+ = {AST::SimplePathSegment (injected_crate_name, Location ()),
+ AST::SimplePathSegment ("prelude", Location ()),
+ AST::SimplePathSegment ("v1", Location ())};
// create use tree and decl
std::unique_ptr<AST::UseTreeGlob> use_tree (
new AST::UseTreeGlob (AST::UseTreeGlob::PATH_PREFIXED,
AST::SimplePath (std::move (segments)), Location ()));
- AST::Attribute prelude_attr (AST::SimplePath::from_str ("prelude_import"),
+ AST::Attribute prelude_attr (AST::SimplePath::from_str ("prelude_import",
+ Location ()),
nullptr);
std::unique_ptr<AST::UseDeclaration> use_decl (
new AST::UseDeclaration (std::move (use_tree),