浏览代码

Update links to documentation

Signed-off-by: Sean Young <sean@mess.org>
Sean Young 3 年之前
父节点
当前提交
4d2d86756f

+ 2 - 2
src/sema/builtin.rs

@@ -825,7 +825,7 @@ pub fn builtin_var(
                 diagnostics.push(Diagnostic::error(
                     *loc,
                     String::from(
-                        "use the function 'tx.gasprice(gas)' in stead, as 'tx.gasprice' may round down to zero. See https://solang.readthedocs.io/en/latest/language.html#gasprice",
+                        "use the function 'tx.gasprice(gas)' in stead, as 'tx.gasprice' may round down to zero. See https://solang.readthedocs.io/en/latest/language/builtins.html#gasprice",
                     ),
                 ));
             }
@@ -948,7 +948,7 @@ pub fn resolve_call(
                         diagnostics.push(Diagnostic::warning(
                             *loc,
                             String::from(
-                                "the function call 'tx.gasprice(1)' may round down to zero. See https://solang.readthedocs.io/en/latest/language.html#gasprice",
+                                "the function call 'tx.gasprice(1)' may round down to zero. See https://solang.readthedocs.io/en/latest/language/builtins.html#gasprice",
                             ),
                         ));
                     }

+ 1 - 1
src/sema/functions.rs

@@ -35,7 +35,7 @@ pub fn contract_function(
             } else {
                 ns.diagnostics.push(Diagnostic::error(
                     func.name_loc,
-                    "function is missing a name. A function without a name is syntax for 'fallback() external' or 'receive() external' in older versions of the Solidity language, see https://solang.readthedocs.io/en/latest/language.html#fallback-and-receive-function".to_string(),
+                    "function is missing a name. A function without a name is syntax for 'fallback() external' or 'receive() external' in older versions of the Solidity language, see https://solang.readthedocs.io/en/latest/language/functions.html#fallback-and-receive-function".to_string(),
                 ));
                 return None;
             }

+ 1 - 1
tests/contract_testcases/substrate/builtins/tx.dot

@@ -2,7 +2,7 @@ strict digraph "tests/contract_testcases/substrate/builtins/tx.sol" {
 	contract [label="contract bar\ntests/contract_testcases/substrate/builtins/tx.sol:2:9-22"]
 	test [label="function test\ncontract: bar\ntests/contract_testcases/substrate/builtins/tx.sol:3:13-35\nsignature test()\nvisibility public\nmutability nonpayable"]
 	diagnostic [label="found contract 'bar'\nlevel Debug\ntests/contract_testcases/substrate/builtins/tx.sol:2:9-22"]
-	diagnostic_5 [label="use the function 'tx.gasprice(gas)' in stead, as 'tx.gasprice' may round down to zero. See https://solang.readthedocs.io/en/latest/language.html#gasprice\nlevel Error\ntests/contract_testcases/substrate/builtins/tx.sol:4:28-39"]
+	diagnostic_5 [label="use the function 'tx.gasprice(gas)' in stead, as 'tx.gasprice' may round down to zero. See https://solang.readthedocs.io/en/latest/language/builtins.html#gasprice\nlevel Error\ntests/contract_testcases/substrate/builtins/tx.sol:4:28-39"]
 	diagnostic_6 [label="implicit conversion would change sign from uint128 to int128\nlevel Error\ntests/contract_testcases/substrate/builtins/tx.sol:4:28-39"]
 	contracts -> contract
 	contract -> test [label="function"]

+ 1 - 1
tests/contract_testcases/substrate/builtins/tx_01.dot

@@ -2,7 +2,7 @@ strict digraph "tests/contract_testcases/substrate/builtins/tx_01.sol" {
 	contract [label="contract bar\ntests/contract_testcases/substrate/builtins/tx_01.sol:2:9-22"]
 	test [label="function test\ncontract: bar\ntests/contract_testcases/substrate/builtins/tx_01.sol:3:13-35\nsignature test()\nvisibility public\nmutability nonpayable"]
 	diagnostic [label="found contract 'bar'\nlevel Debug\ntests/contract_testcases/substrate/builtins/tx_01.sol:2:9-22"]
-	diagnostic_5 [label="the function call 'tx.gasprice(1)' may round down to zero. See https://solang.readthedocs.io/en/latest/language.html#gasprice\nlevel Warning\ntests/contract_testcases/substrate/builtins/tx_01.sol:4:28-44"]
+	diagnostic_5 [label="the function call 'tx.gasprice(1)' may round down to zero. See https://solang.readthedocs.io/en/latest/language/builtins.html#gasprice\nlevel Warning\ntests/contract_testcases/substrate/builtins/tx_01.sol:4:28-44"]
 	diagnostic_6 [label="implicit conversion would change sign from uint128 to int128\nlevel Error\ntests/contract_testcases/substrate/builtins/tx_01.sol:4:28-44"]
 	contracts -> contract
 	contract -> test [label="function"]

+ 1 - 1
tests/contract_testcases/substrate/functions/fallback.dot

@@ -8,7 +8,7 @@ strict digraph "tests/contract_testcases/substrate/functions/fallback.sol" {
 	storage_load [label="storage load int64\ntests/contract_testcases/substrate/functions/fallback.sol:6:17-30"]
 	storage_var [label="storage variable\ntest.result\nint64 storage\ntests/contract_testcases/substrate/functions/fallback.sol:6:24-30"]
 	diagnostic [label="found contract 'test'\nlevel Debug\ntests/contract_testcases/substrate/functions/fallback.sol:2:9-23"]
-	diagnostic_11 [label="function is missing a name. A function without a name is syntax for 'fallback() external' or 'receive() external' in older versions of the Solidity language, see https://solang.readthedocs.io/en/latest/language.html#fallback-and-receive-function\nlevel Error\ntests/contract_testcases/substrate/functions/fallback.sol:9:13-32"]
+	diagnostic_11 [label="function is missing a name. A function without a name is syntax for 'fallback() external' or 'receive() external' in older versions of the Solidity language, see https://solang.readthedocs.io/en/latest/language/functions.html#fallback-and-receive-function\nlevel Error\ntests/contract_testcases/substrate/functions/fallback.sol:9:13-32"]
 	contracts -> contract
 	contract -> var [label="variable"]
 	var -> number_literal [label="initializer"]