Skip to content

Commit

Permalink
build: Update rust toolchain version (#5087)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: eitsupi <[email protected]>
  • Loading branch information
3 people authored Jan 12, 2025
1 parent 0062fcf commit 02e8e58
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
steps:
- name: 📂 Checkout code
uses: actions/checkout@v4
- run: rustup override set nightly-2024-06-30
- run: rustup override set nightly-2025-01-12
- uses: baptiste0928/cargo-install@v3
with:
crate: cargo-udeps
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ jobs:
steps:
- name: 📂 Checkout code
uses: actions/checkout@v4
- run: rustup override set nightly-2024-06-30
- run: rustup override set nightly-2025-01-12
- uses: baptiste0928/cargo-install@v3
with:
crate: cargo-hack
Expand Down
12 changes: 7 additions & 5 deletions prqlc/prqlc-parser/src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,15 @@ mod tests {
"#);
}

#[cfg(test)]
impl SupportsDocComment for String {
fn with_doc_comment(self, _doc_comment: Option<String>) -> Self {
self
}
}

#[test]
fn test_no_doc_comment_in_with_doc_comment() {
impl SupportsDocComment for String {
fn with_doc_comment(self, _doc_comment: Option<String>) -> Self {
self
}
}
assert_debug_snapshot!(parse_with_parser(r#"hello"#, with_doc_comment(new_line().ignore_then(ident_part()))).unwrap(), @r#""hello""#);
}
}
2 changes: 1 addition & 1 deletion prqlc/prqlc-parser/src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl<'de> Deserialize<'de> for Span {
{
struct SpanVisitor {}

impl<'de> Visitor<'de> for SpanVisitor {
impl Visitor<'_> for SpanVisitor {
type Value = Span;

fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
Expand Down
4 changes: 2 additions & 2 deletions prqlc/prqlc/src/codegen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ struct SeparatedExprs<'a, T: WriteSource> {
line_end: &'static str,
}

impl<'a, T: WriteSource> WriteSource for SeparatedExprs<'a, T> {
impl<T: WriteSource> WriteSource for SeparatedExprs<'_, T> {
fn write(&self, mut opt: WriteOpt) -> Option<String> {
// try inline
if let Some(inline) = self.write_inline(opt.clone()) {
Expand Down Expand Up @@ -180,7 +180,7 @@ impl<'a, T: WriteSource> WriteSource for SeparatedExprs<'a, T> {
}
}

impl<'a, T: WriteSource> SeparatedExprs<'a, T> {
impl<T: WriteSource> SeparatedExprs<'_, T> {
fn write_inline(&self, mut opt: WriteOpt) -> Option<String> {
let mut exprs = Vec::new();
for expr in self.exprs {
Expand Down
2 changes: 1 addition & 1 deletion prqlc/prqlc/src/error_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ impl<'a> FileTreeCache<'a> {
}
}

impl<'a> Cache<PathBuf> for FileTreeCache<'a> {
impl Cache<PathBuf> for FileTreeCache<'_> {
type Storage = String;
fn fetch(&mut self, id: &PathBuf) -> Result<&Source, Box<dyn fmt::Debug + '_>> {
let file_contents = match self.file_tree.sources.get(id) {
Expand Down
2 changes: 1 addition & 1 deletion prqlc/prqlc/src/ir/decl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl std::fmt::Debug for Module {

struct DebugNames<'a>(&'a HashMap<String, Decl>);

impl<'a> std::fmt::Debug for DebugNames<'a> {
impl std::fmt::Debug for DebugNames<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut dm = f.debug_map();
for (n, decl) in self.0.iter().sorted_by_key(|x| x.0) {
Expand Down
4 changes: 2 additions & 2 deletions prqlc/prqlc/src/semantic/reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct Labeler<'a> {
report: &'a mut ReportBuilder<'static, (String, Range<usize>)>,
}

impl<'a> Labeler<'a> {
impl Labeler<'_> {
fn label_module(&mut self, module: &Module) {
for (_, decl) in module.names.iter() {
if let DeclKind::TableDecl(TableDecl {
Expand All @@ -67,7 +67,7 @@ impl<'a> Labeler<'a> {
}
}

impl<'a> pl::PlFold for Labeler<'a> {
impl pl::PlFold for Labeler<'_> {
fn fold_expr(&mut self, node: pl::Expr) -> Result<pl::Expr> {
if let Some(ident) = node.kind.as_ident() {
if let Some(span) = node.span {
Expand Down
4 changes: 2 additions & 2 deletions prqlc/prqlc/src/sql/pq/anchor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ impl<'a> CidRedirector<'a> {
}
}

impl<'a> RqFold for CidRedirector<'a> {
impl RqFold for CidRedirector<'_> {
fn fold_cid(&mut self, cid: CId) -> Result<CId> {
Ok(self.cid_redirects.get(&cid).cloned().unwrap_or(cid))
}
Expand All @@ -666,7 +666,7 @@ impl<'a> RqFold for CidRedirector<'a> {
}
}

impl<'a> PqMapper<RIId, RIId, Transform, Transform> for CidRedirector<'a> {
impl PqMapper<RIId, RIId, Transform, Transform> for CidRedirector<'_> {
fn fold_rel(&mut self, rel: RIId) -> Result<RIId> {
Ok(rel)
}
Expand Down
6 changes: 3 additions & 3 deletions prqlc/prqlc/src/sql/pq/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ impl AnchorContext {
QueryLoader::load(context, query)
}

/// Generates a new ID and name for a wildcard column and registers it in the
/// AnchorContext's column_decls HashMap.
// /// Generates a new ID and name for a wildcard column and registers it in the
// /// AnchorContext's column_decls HashMap.
// pub fn register_wildcard(&mut self, riid: RIId) -> CId {
// let id = self.cid.gen();
// let kind = ColumnDecl::RelationColumn(riid, id, RelationColumn::Wildcard);
Expand Down Expand Up @@ -240,7 +240,7 @@ impl AnchorContext {
}
}

/// Returns a set of all columns of all tables in a pipeline
// /// Returns a set of all columns of all tables in a pipeline
// pub(super) fn collect_pipeline_inputs(
// &self,
// pipeline: &[SqlTransform],
Expand Down
4 changes: 2 additions & 2 deletions prqlc/prqlc/src/sql/pq/gen_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ struct TransformCompiler<'a> {
ctx: &'a mut Context,
}

impl<'a> RqFold for TransformCompiler<'a> {}
impl RqFold for TransformCompiler<'_> {}

impl<'a> PqMapper<RIId, pq::RelationExpr, rq::Transform, ()> for TransformCompiler<'a> {
impl PqMapper<RIId, pq::RelationExpr, rq::Transform, ()> for TransformCompiler<'_> {
fn fold_rel(&mut self, rel: RIId) -> Result<pq::RelationExpr> {
compile_relation_instance(rel, self.ctx)
}
Expand Down
12 changes: 6 additions & 6 deletions prqlc/prqlc/src/sql/pq/postprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ struct CteSorting {
has_been_used: bool,
}

impl<'a> RqFold for SortingInference<'a> {}
impl RqFold for SortingInference<'_> {}

impl<'a> PqFold for SortingInference<'a> {
impl PqFold for SortingInference<'_> {
fn fold_sql_query(&mut self, query: SqlQuery) -> Result<SqlQuery> {
let mut ctes = Vec::with_capacity(query.ctes.len());
for cte in query.ctes {
Expand Down Expand Up @@ -102,7 +102,7 @@ impl<'a> PqFold for SortingInference<'a> {
}
}

impl<'a> PqMapper<RelationExpr, RelationExpr, (), ()> for SortingInference<'a> {
impl PqMapper<RelationExpr, RelationExpr, (), ()> for SortingInference<'_> {
fn fold_rel(&mut self, rel: RelationExpr) -> Result<RelationExpr> {
Ok(rel)
}
Expand Down Expand Up @@ -200,9 +200,9 @@ struct RelVarNameAssigner<'a> {
ctx: &'a mut Context,
}

impl<'a> RqFold for RelVarNameAssigner<'a> {}
impl RqFold for RelVarNameAssigner<'_> {}

impl<'a> PqFold for RelVarNameAssigner<'a> {
impl PqFold for RelVarNameAssigner<'_> {
fn fold_sql_relation(&mut self, relation: SqlRelation) -> Result<SqlRelation> {
// only fold AtomicPipelines
Ok(match relation {
Expand All @@ -221,7 +221,7 @@ impl<'a> PqFold for RelVarNameAssigner<'a> {
}
}

impl<'a> PqMapper<RelationExpr, RelationExpr, (), ()> for RelVarNameAssigner<'a> {
impl PqMapper<RelationExpr, RelationExpr, (), ()> for RelVarNameAssigner<'_> {
fn fold_rel(&mut self, mut rel: RelationExpr) -> Result<RelationExpr> {
// normal fold
rel.kind = match rel.kind {
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[toolchain]
# Generally run 1 behind latest
channel = "1.82.0"
channel = "1.83.0"
components = ["rustfmt", "clippy"]
# We want two targets: wasm32, and the default target for the platform, which we
# don't list here. (i.e. we use each platform to test each platform)
Expand Down

0 comments on commit 02e8e58

Please sign in to comment.