Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ toolchain = { path = "./crates/toolchain", version = "0.0.0" }
tt = { path = "./crates/tt", version = "0.0.0" }
vfs-notify = { path = "./crates/vfs-notify", version = "0.0.0" }
vfs = { path = "./crates/vfs", version = "0.0.0" }
edition = { path = "./crates/edition", version = "0.0.0" }

ra-ap-rustc_lexer = { version = "0.85", default-features = false }
ra-ap-rustc_parse_format = { version = "0.85", default-features = false }
Expand Down
13 changes: 13 additions & 0 deletions crates/edition/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "edition"
version = "0.0.0"
rust-version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true

[dependencies]

[lints]
workspace = true
3 changes: 1 addition & 2 deletions crates/parser/src/edition.rs → crates/edition/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! The edition of the Rust language used in a crate.
// Ideally this would be defined in the span crate, but the dependency chain is all over the place
// wrt to span, parser and syntax.
// This should live in a separate crate because we use it in both actual code and codegen.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just include! this file in xtask instead? I personally don't really like this small thing being a crate. Or just duplicate what we need given its not much

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to duplicate because then adding edition will need to touch both. But include!() seems fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works for rustc but r-a is unable to find the file both with #[path = "..."] mod edition; and with include!(), do you know why?

Copy link
Member

@Veykril Veykril Dec 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahaha, right. This fails in r-a because the include lies outside of the source root of the crate itself so we fail to resolve the path... This is one of the outstanding problems with our VFS system

In that case I guess we can stay with the crate for now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@rustbot ready

use std::fmt;

#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
Expand Down
2 changes: 1 addition & 1 deletion crates/ide-completion/src/completions/attribute/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub(super) fn complete_lint(
existing_lints: &[ast::Path],
lints_completions: &[Lint],
) {
for &Lint { label, description } in lints_completions {
for &Lint { label, description, .. } in lints_completions {
let (qual, name) = {
// FIXME: change `Lint`'s label to not store a path in it but split the prefix off instead?
let mut parts = label.split("::");
Expand Down
Loading
Loading