Build: Use meson_Cargo.toml.in for setting up the build
to make rust-analyzer work correctly. When the paths in Cargo.toml have '@path@' in them, rust-analyzer cannot find the correct paths. Before this change, rust-analyzer was unable to offer information about code (in files other than main.rs), and instead showed an error-message: "1:1 unused: This file is not included anywhere in the module tree, so rust-analyzer can't offer IDE services.". Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/657>
This commit is contained in:
		
				
					committed by
					
						
						Marge Bot
					
				
			
			
				
	
			
			
			
						parent
						
							0b83eb7d9f
						
					
				
				
					commit
					0403fe4cde
				
			@ -5,21 +5,21 @@ edition = "2021"
 | 
			
		||||
 | 
			
		||||
[lib]
 | 
			
		||||
name = "rs"
 | 
			
		||||
path = "@path@/src/lib.rs"
 | 
			
		||||
path = "src/lib.rs"
 | 
			
		||||
crate-type = ["staticlib", "rlib"]
 | 
			
		||||
 | 
			
		||||
# Cargo can't do autodiscovery if Cargo.toml is not in the root.
 | 
			
		||||
[[bin]]
 | 
			
		||||
name = "test_layout"
 | 
			
		||||
path = "@path@/src/bin/test_layout.rs"
 | 
			
		||||
path = "src/bin/test_layout.rs"
 | 
			
		||||
 | 
			
		||||
[[example]]
 | 
			
		||||
name = "test_layout"
 | 
			
		||||
path = "@path@/examples/test_layout.rs"
 | 
			
		||||
path = "examples/test_layout.rs"
 | 
			
		||||
 | 
			
		||||
[[example]]
 | 
			
		||||
name = "find_orphan_layouts"
 | 
			
		||||
path = "@path@/examples/find_orphan_layouts.rs"
 | 
			
		||||
path = "examples/find_orphan_layouts.rs"
 | 
			
		||||
 | 
			
		||||
[features]
 | 
			
		||||
zbus_v1_5 = []
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user