mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	 92b84f849a
			
		
	
	
		92b84f849a
		
	
	
	
	
		
			
			Before: http://notriddle.com/rustdoc-html-demo-6/tor-before/tor_config/ After: http://notriddle.com/rustdoc-html-demo-6/tor-after/tor_config/ Profile: http://notriddle.com/rustdoc-html-demo-6/tor-profile/ As a bit of background information: in type-based queries, a type name that does not exist gets treated as a generic type variable. This causes a counterintuitive behavior in the `tor_config` crate, which has a trait with an associated type variable called `T`. This isn't a searchable concrete type, but its name still gets stored in the typeNameIdMap, as a convenient way to intern its name.
		
			
				
	
	
		
			71 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			71 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const EXPECTED = [
 | |
|     {
 | |
|         'query': 'T -> T',
 | |
|         'correction': null,
 | |
|         'others': [
 | |
|             {
 | |
|                 'path': 'enum_variant_not_type',
 | |
|                 'name': 'my_fn',
 | |
|             },
 | |
|             {
 | |
|                 'path': 'enum_variant_not_type::AutoCorrectConfounder',
 | |
|                 'name': 'assoc_type_acts_like_generic',
 | |
|             },
 | |
|         ],
 | |
|     },
 | |
|     {
 | |
|         'query': 'InsertUnnecessarilyLongTypeNameHere -> InsertUnnecessarilyLongTypeNameHere',
 | |
|         'correction': null,
 | |
|         'others': [
 | |
|             {
 | |
|                 'path': 'enum_variant_not_type',
 | |
|                 'name': 'my_fn',
 | |
|             },
 | |
|             {
 | |
|                 'path': 'enum_variant_not_type::AutoCorrectConfounder',
 | |
|                 'name': 'assoc_type_acts_like_generic',
 | |
|             },
 | |
|         ],
 | |
|     },
 | |
|     {
 | |
|         'query': 'InsertUnnecessarilyLongTypeNameHere',
 | |
|         'correction': null,
 | |
|         'others': [
 | |
|             {
 | |
|                 'path': 'enum_variant_not_type::AutoCorrectConfounder',
 | |
|                 'name': 'InsertUnnecessarilyLongTypeNameHere',
 | |
|             },
 | |
|         ],
 | |
|     },
 | |
|     {
 | |
|         'query': 'InsertUnnecessarilyLongTypeNameHereX',
 | |
|         'correction': null,
 | |
|         'others': [
 | |
|             {
 | |
|                 'path': 'enum_variant_not_type::AutoCorrectConfounder',
 | |
|                 'name': 'InsertUnnecessarilyLongTypeNameHere',
 | |
|             },
 | |
|         ],
 | |
|     },
 | |
|     {
 | |
|         'query': 'T',
 | |
|         'correction': null,
 | |
|         'others': [
 | |
|             {
 | |
|                 'path': 'enum_variant_not_type::MyTrait',
 | |
|                 'name': 'T',
 | |
|             },
 | |
|         ],
 | |
|     },
 | |
|     {
 | |
|         'query': 'T',
 | |
|         'correction': null,
 | |
|         'others': [
 | |
|             {
 | |
|                 'path': 'enum_variant_not_type::MyTrait',
 | |
|                 'name': 'T',
 | |
|             },
 | |
|         ],
 | |
|     },
 | |
| ];
 |