Skip to content

Commit

Permalink
Merge #135
Browse files Browse the repository at this point in the history
135: bump nightly -> 2023-06-01 r=xFrednet a=xFrednet

Just a simple nightly bump, not much more. Luckily, another simple one :)

---

Closes #128

r? `@ghost`

Co-authored-by: xFrednet <xFrednet@gmail.com>
  • Loading branch information
bors[bot] and xFrednet committed Jun 3, 2023
2 parents b299a3d + ce6f3f3 commit 0b372aa
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-04-20
toolchain: nightly-2023-06-01
components: cargo, clippy, rustfmt
- run: rustc -vV
- run: cargo build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust_bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-04-20
toolchain: nightly-2023-06-01
components: cargo, clippy, rustfmt
- run: rustc -vV
- run: cargo build
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ members = [
# This is needed for rust-analyzer, uitests and other tools
"marker_lints",
]
resolver = "2"

[workspace.metadata.marker.lints]
marker_lints = { path = "marker_lints" }
2 changes: 1 addition & 1 deletion cargo-marker/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::{cli::Flags, ExitStatus};
/// This is the driver version and toolchain, that is used by the setup command
/// to install the driver.
static DEFAULT_DRIVER_INFO: Lazy<RustcDriverInfo> = Lazy::new(|| RustcDriverInfo {
toolchain: "nightly-2023-04-20".to_string(),
toolchain: "nightly-2023-06-01".to_string(),
version: "0.1.0".to_string(),
api_version: "0.1.0".to_string(),
});
Expand Down
14 changes: 7 additions & 7 deletions marker_driver_rustc/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,27 +88,27 @@ impl<'ast, 'tcx: 'ast> DriverContext<'ast> for RustcContext<'ast, 'tcx> {
lint,
id,
self.rustc_converter.to_span(diag.span),
diag.msg(),
diag.msg().to_string(),
|builder| {
for part in diag.parts.get() {
match part {
marker_api::diagnostic::DiagnosticPart::Help { msg } => {
builder.help(msg.get());
builder.help(msg.get().to_string());
},
marker_api::diagnostic::DiagnosticPart::HelpSpan { msg, span } => {
builder.span_help(self.rustc_converter.to_span(span), msg.get());
builder.span_help(self.rustc_converter.to_span(span), msg.get().to_string());
},
marker_api::diagnostic::DiagnosticPart::Note { msg } => {
builder.note(msg.get());
builder.note(msg.get().to_string());
},
marker_api::diagnostic::DiagnosticPart::NoteSpan { msg, span } => {
builder.span_note(self.rustc_converter.to_span(span), msg.get());
builder.span_note(self.rustc_converter.to_span(span), msg.get().to_string());
},
marker_api::diagnostic::DiagnosticPart::Suggestion { msg, span, sugg, app } => {
builder.span_suggestion(
self.rustc_converter.to_span(span),
msg.get(),
sugg.get(),
msg.get().to_string(),
sugg.get().to_string(),
self.rustc_converter.to_applicability(*app),
);
},
Expand Down
4 changes: 4 additions & 0 deletions marker_driver_rustc/src/conversion/marker/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,10 @@ impl<'ast, 'tcx> MarkerConverterInner<'ast, 'tcx> {
StrLitData::Bytes(self.alloc_slice(bytes.iter().copied()).into()),
)
})),
// Still unstable see: https://github.com/rust-lang/rust/issues/105723
rustc_ast::LitKind::CStr(_, _) => {
ExprKind::Unstable(self.alloc(UnstableExpr::new(data, ExprPrecedence::Lit)))
},
rustc_ast::LitKind::Byte(value) => {
ExprKind::IntLit(self.alloc(IntLitExpr::new(data, u128::from(*value), None)))
},
Expand Down
2 changes: 1 addition & 1 deletion marker_driver_rustc/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use std::ops::Deref;
use std::path::{Path, PathBuf};
use std::process::{exit, Command};

const RUSTC_TOOLCHAIN_VERSION: &str = "nightly-2023-04-20";
const RUSTC_TOOLCHAIN_VERSION: &str = "nightly-2023-06-01";

struct DefaultCallbacks;
impl rustc_driver::Callbacks for DefaultCallbacks {}
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "nightly-2023-04-20"
channel = "nightly-2023-06-01"
components = ["cargo", "llvm-tools-preview", "rust-src", "rust-std", "rustc", "rustc-dev", "rustfmt"]
# This has to be synced with the toolchain in `github/workflows`
2 changes: 1 addition & 1 deletion util/update-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if [[ $1 == nightly-????-??-?? ]]
then
sed -i "s/nightly-2023-04-20/$1/g" ./marker_driver_rustc/src/main.rs ./rust-toolchain .github/workflows/* ./util/update-toolchain.sh cargo-marker/src/driver.rs
sed -i "s/nightly-2023-06-01/$1/g" ./marker_driver_rustc/src/main.rs ./rust-toolchain .github/workflows/* ./util/update-toolchain.sh cargo-marker/src/driver.rs
else
echo "Please enter a valid toolchain like \`nightly-2022-01-01\`"
fi;

0 comments on commit 0b372aa

Please sign in to comment.