Skip to content

Commit

Permalink
Upgrade examples
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Feb 26, 2025
1 parent 60f27b9 commit 2fbefe6
Show file tree
Hide file tree
Showing 37 changed files with 153 additions and 140 deletions.
40 changes: 20 additions & 20 deletions Cargo.lock

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

16 changes: 8 additions & 8 deletions examples/experimental/derive_opportunity/Cargo.lock

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

2 changes: 1 addition & 1 deletion examples/experimental/derive_opportunity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ name = "ui_ignore"
path = "ui_ignore/main.rs"

[dependencies]
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "19e305bb57a7595f2a8d81f521c0dd8bf854e739" }
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "238edf273d195c8e472851ebd60571f77f978ac8" }
once_cell = "1.20"
serde = "1.0"

Expand Down
2 changes: 1 addition & 1 deletion examples/experimental/derive_opportunity/rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2025-01-09"
channel = "nightly-2025-02-20"
components = ["llvm-tools-preview", "rustc-dev"]
16 changes: 8 additions & 8 deletions examples/experimental/missing_doc_comment_openai/Cargo.lock

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

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ publish = false
crate-type = ["cdylib"]

[dependencies]
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "19e305bb57a7595f2a8d81f521c0dd8bf854e739" }
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "238edf273d195c8e472851ebd60571f77f978ac8" }
curl = "0.4"
serde = "1.0"
serde_json = "1.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2025-01-09"
channel = "nightly-2025-02-20"
components = ["llvm-tools-preview", "rustc-dev"]
16 changes: 8 additions & 8 deletions examples/experimental/overscoped_allow/Cargo.lock

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

2 changes: 1 addition & 1 deletion examples/experimental/overscoped_allow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ path = "ui_test/main.rs"
[dependencies]
anyhow = "1.0"
cargo_metadata = "0.19"
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "19e305bb57a7595f2a8d81f521c0dd8bf854e739" }
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "238edf273d195c8e472851ebd60571f77f978ac8" }
once_cell = "1.20"
serde = "1.0"
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/experimental/overscoped_allow/rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2025-01-09"
channel = "nightly-2025-02-20"
components = ["llvm-tools-preview", "rustc-dev"]
16 changes: 8 additions & 8 deletions examples/general/Cargo.lock

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

2 changes: 1 addition & 1 deletion examples/general/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ exclude = [".cargo", "src"]

[workspace.dependencies]
bitflags = "2.8"
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "19e305bb57a7595f2a8d81f521c0dd8bf854e739" }
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "238edf273d195c8e472851ebd60571f77f978ac8" }
derivative = "2.2.0"
once_cell = "1.20"
serde = "1.0"
Expand Down
6 changes: 3 additions & 3 deletions examples/general/abs_home_path/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ impl<'tcx> LateLintPass<'tcx> for AbsHomePath {
impl AbsHomePath {
fn find_test_fns(&mut self, cx: &LateContext<'_>) {
for item_id in cx.tcx.hir().items() {
let item = cx.tcx.hir().item(item_id);
let item = cx.tcx.hir_item(item_id);
// smoelius:
// https://rustc-dev-guide.rust-lang.org/test-implementation.html?step-3-test-object-generation
if let ItemKind::Const(ty, _, const_body_id) = item.kind
&& let Some(ty_def_id) = path_def_id(cx, ty)
&& match_def_path(cx, ty_def_id, &paths::TEST_DESC_AND_FN)
&& let const_body = cx.tcx.hir().body(const_body_id)
&& let const_body = cx.tcx.hir_body(const_body_id)
&& let ExprKind::Struct(_, fields, _) = const_body.value.kind
&& let Some(testfn) = fields.iter().find(|field| field.ident.as_str() == "testfn")
// smoelius: Callee is `self::test::StaticTestFn`.
Expand All @@ -116,7 +116,7 @@ impl AbsHomePath {
body: closure_body_id,
..
}) = arg.kind
&& let closure_body = cx.tcx.hir().body(*closure_body_id)
&& let closure_body = cx.tcx.hir_body(*closure_body_id)
// smoelius: Callee is `self::test::assert_test_result`.
&& let ExprKind::Call(_, [arg]) = closure_body.value.kind
// smoelius: Callee is test function.
Expand Down
Loading

0 comments on commit 2fbefe6

Please sign in to comment.