Skip to content

Commit bae724e

Browse files
bors[bot]xFrednet
andauthored
Merge #79
79: Bump rust nightly -> 2022-12-15 r=xFrednet a=xFrednet Closes #55 Co-authored-by: xFrednet <[email protected]>
2 parents 0a449ed + fce9f3c commit bae724e

File tree

9 files changed

+15
-17
lines changed

9 files changed

+15
-17
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- uses: actions/checkout@v3
3939
- uses: actions-rs/toolchain@v1
4040
with:
41-
toolchain: nightly-2022-11-03
41+
toolchain: nightly-2022-12-15
4242
components: cargo, clippy, rustfmt
4343
- run: rustc -vV
4444
- run: cargo build

.github/workflows/rust_bors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- uses: actions/checkout@v3
2828
- uses: actions-rs/toolchain@v1
2929
with:
30-
toolchain: nightly-2022-11-03
30+
toolchain: nightly-2022-12-15
3131
components: cargo, clippy, rustfmt
3232
- run: rustc -vV
3333
- run: cargo build

cargo-marker/src/driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use crate::ExitStatus;
2121
/// This is the driver version and toolchain, that is used by the setup command
2222
/// to install the driver.
2323
static DEFAULT_DRIVER_INFO: Lazy<RustcDriverInfo> = Lazy::new(|| RustcDriverInfo {
24-
toolchain: "nightly-2022-11-03".to_string(),
24+
toolchain: "nightly-2022-12-15".to_string(),
2525
version: "0.1.0".to_string(),
2626
api_version: "0.1.0".to_string(),
2727
});

marker_driver_rustc/src/conversion/common/ast_path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::{context::RustcContext, conversion::generic::to_api_generic_args_opt}
55

66
use super::to_symbol_id;
77

8-
pub fn to_api_path<'ast, 'tcx>(cx: &'ast RustcContext<'ast, 'tcx>, path: &hir::Path<'tcx>) -> AstPath<'ast> {
8+
pub fn to_api_path<'ast, 'tcx, T>(cx: &'ast RustcContext<'ast, 'tcx>, path: &hir::Path<'tcx, T>) -> AstPath<'ast> {
99
AstPath::new(
1010
cx.storage
1111
.alloc_slice_iter(path.segments.iter().map(|seg| conv_segment(cx, seg))),

marker_driver_rustc/src/conversion/generic.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,18 @@ pub fn to_api_lifetime<'ast, 'tcx>(
1111
_cx: &'ast RustcContext<'ast, 'tcx>,
1212
rust_lt: &rustc_hir::Lifetime,
1313
) -> Option<Lifetime<'ast>> {
14-
let kind = match rust_lt.name {
15-
rustc_hir::LifetimeName::Param(local_id, rustc_hir::ParamName::Plain(ident)) => {
16-
LifetimeKind::Label(to_symbol_id(ident.name), to_generic_id(local_id.to_def_id()))
14+
let kind = match rust_lt.res {
15+
rustc_hir::LifetimeName::Param(_) if rust_lt.is_anonymous() => return None,
16+
rustc_hir::LifetimeName::Param(local_id) => {
17+
LifetimeKind::Label(to_symbol_id(rust_lt.ident.name), to_generic_id(local_id.to_def_id()))
1718
},
18-
rustc_hir::LifetimeName::Param(_local_id, rustc_hir::ParamName::Fresh) => return None,
1919
rustc_hir::LifetimeName::ImplicitObjectLifetimeDefault => return None,
2020
rustc_hir::LifetimeName::Infer => LifetimeKind::Infer,
2121
rustc_hir::LifetimeName::Static => LifetimeKind::Static,
22-
rustc_hir::LifetimeName::Param(_, rustc_hir::ParamName::Error) | rustc_hir::LifetimeName::Error => {
23-
unreachable!("would have triggered a rustc error")
24-
},
22+
rustc_hir::LifetimeName::Error => unreachable!("would have triggered a rustc error"),
2523
};
2624

27-
Some(Lifetime::new(Some(to_span_id(rust_lt.span)), kind))
25+
Some(Lifetime::new(Some(to_span_id(rust_lt.ident.span)), kind))
2826
}
2927

3028
pub fn to_api_generic_args_from_path<'ast, 'tcx>(

marker_driver_rustc/src/conversion/item.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,8 @@ impl<'ast, 'tcx> ItemConverter<'ast, 'tcx> {
425425
fn conv_variant_data(&self, var_data: &'tcx hir::VariantData) -> AdtKind<'ast> {
426426
match var_data {
427427
hir::VariantData::Struct(fields, _recovered) => AdtKind::Field(self.conv_field_defs(fields).into()),
428-
hir::VariantData::Tuple(fields, _) => AdtKind::Tuple(self.conv_field_defs(fields).into()),
429-
hir::VariantData::Unit(_) => AdtKind::Unit,
428+
hir::VariantData::Tuple(fields, ..) => AdtKind::Tuple(self.conv_field_defs(fields).into()),
429+
hir::VariantData::Unit(..) => AdtKind::Unit,
430430
}
431431
}
432432

marker_driver_rustc/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use std::ops::Deref;
3535
use std::path::{Path, PathBuf};
3636
use std::process::{exit, Command};
3737

38-
const RUSTC_TOOLCHAIN_VERSION: &str = "nightly-2022-11-03";
38+
const RUSTC_TOOLCHAIN_VERSION: &str = "nightly-2022-12-15";
3939

4040
struct DefaultCallbacks;
4141
impl rustc_driver::Callbacks for DefaultCallbacks {}

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
2-
channel = "nightly-2022-11-03"
2+
channel = "nightly-2022-12-15"
33
components = ["cargo", "llvm-tools-preview", "rust-src", "rust-std", "rustc", "rustc-dev", "rustfmt"]
44
# This has to be synced with the toolchain in `github/workflows`

util/update-toolchain.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
if [[ $1 == nightly-????-??-?? ]]
44
then
5-
sed -i "s/nightly-2022-11-03/$1/g" ./marker_driver_rustc/src/main.rs ./rust-toolchain .github/workflows/* ./util/update-toolchain.sh cargo-marker/src/main.rs
5+
sed -i "s/nightly-2022-12-15/$1/g" ./marker_driver_rustc/src/main.rs ./rust-toolchain .github/workflows/* ./util/update-toolchain.sh cargo-marker/src/driver.rs
66
else
77
echo "Please enter a valid toolchain like \`nightly-2022-01-01\`"
88
fi;

0 commit comments

Comments
 (0)