Skip to content

bug: Rust Bindings Issue #324

@srod5125

Description

@srod5125

Did you check existing issues?

  • I have read all the tree-sitter docs if it relates to using the parser
  • I have searched the existing issues of tree-sitter-python

Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)

No response

Describe the bug

from/into type issue

Steps To Reproduce/Bad Parse Tree

The following main.rs fails

use tree_sitter;

fn main() {
    let mut parser = tree_sitter::Parser::new();

    parser
        .set_language(&tree_sitter_python::LANGUAGE.into())
        .expect("err loading py");
}

with the following cargo.toml

[package]
name = "test_py_tree"
version = "0.1.0"
edition = "2024"

[dependencies]
tree-sitter = { git = "https://github.com/tree-sitter/tree-sitter.git", branch = "master" }
tree-sitter-python = { git = "https://github.com/tree-sitter/tree-sitter-python.git", branch = "master" }

with error message: the trait 'From<tree_sitter_language::LanguageFn>' is not implemented for tree_sitter::Language

Expected Behavior/Parse Tree

Expectation: the above code compiles
tree-sitter : dd60d5cff079dbae8db798ce7272879dbd2ac9e8
py-tree-sitter : 7d67afb3323d0d5c5510891cdc459d55b8ba3831

Repro

(listed above)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions