Merge #1083
1083: bugfix: fix several minor issues r=CohenArthur a=liushuyu - Fixed `-frust-crate= option` got incorrectly overridden by a default value (`example`) - Fix a minor typo in `gcc/rust/ast/rust-ast-full-test.cc` Co-authored-by: liushuyu <liushuyu011@gmail.com>
This commit is contained in:
commit
779de323f3
|
@ -311,7 +311,7 @@ Visibility::as_string () const
|
|||
case NONE:
|
||||
return std::string ("pub");
|
||||
case CRATE:
|
||||
return std::string ("ub(crate)");
|
||||
return std::string ("pub(crate)");
|
||||
case SELF:
|
||||
return std::string ("pub(self)");
|
||||
case SUPER:
|
||||
|
|
|
@ -311,8 +311,9 @@ Session::init ()
|
|||
// setup backend to GCC GIMPLE
|
||||
backend = rust_get_backend ();
|
||||
|
||||
// set the default crate name
|
||||
options.set_crate_name (kDefaultCrateName);
|
||||
// set the default crate name if crate name was unset
|
||||
if (options.crate_name.empty ())
|
||||
options.set_crate_name (kDefaultCrateName);
|
||||
}
|
||||
|
||||
/* Initialise default options. Actually called before handle_option, unlike init
|
||||
|
|
Loading…
Reference in New Issue