Create a Diagnostic quen the main .60 file can't be loaded

This commit is contained in:
Olivier Goffart 2021-03-15 11:42:35 +01:00
parent 2ae5b8413a
commit cae88f0823
5 changed files with 24 additions and 11 deletions

View file

@ -329,7 +329,7 @@ pub fn sixtyfps(stream: TokenStream) -> TokenStream {
let source_file = if let Some(cargo_manifest) = std::env::var_os("CARGO_MANIFEST_DIR") {
let mut path: std::path::PathBuf = cargo_manifest.into();
path.push("Cargo.toml");
Some(diagnostics::SourceFileInner::from_path(path))
Some(diagnostics::SourceFileInner::from_path_only(path))
} else {
None
};