Skip to content

Commit

Permalink
Ignore both std and core preludes (fixes #223) (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
msrd0 authored Jan 27, 2023
1 parent 1f7b3d5 commit 466addd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,9 @@ fn read_scope_from_file(

fn is_prelude_import(item_use: &ItemUse) -> bool {
match &item_use.tree {
UseTree::Path(UsePath { ident, tree, .. }) if ident == "std" => {
UseTree::Path(UsePath { ident, tree, .. })
if ident == "std" || ident == "core" =>
{
match tree.as_ref() {
UseTree::Path(UsePath { ident, .. }) => ident == "prelude",
_ => false
Expand Down

0 comments on commit 466addd

Please sign in to comment.